mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 12:49:34 +00:00
98_weekprofile: ignore dummy, readonly and ignored devices
git-svn-id: https://svn.fhem.de/fhem/trunk@21373 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
6a460a423f
commit
9665644f57
@ -110,6 +110,16 @@ sub weekprofile_getDeviceType($$;$)
|
|||||||
{
|
{
|
||||||
my ($me,$device,$sndrcv) = @_;
|
my ($me,$device,$sndrcv) = @_;
|
||||||
|
|
||||||
|
if (IsDummy($device)){
|
||||||
|
Log3 $me, 4, "$me(getDeviceType): $device is dummy - ignored";
|
||||||
|
return undef;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (IsIgnored($device)){
|
||||||
|
Log3 $me, 4, "$me(getDeviceType): $device is ignored";
|
||||||
|
return undef;
|
||||||
|
}
|
||||||
|
|
||||||
$sndrcv = "RCV" if (!defined($sndrcv));
|
$sndrcv = "RCV" if (!defined($sndrcv));
|
||||||
|
|
||||||
# determine device type
|
# determine device type
|
||||||
@ -127,6 +137,12 @@ sub weekprofile_getDeviceType($$;$)
|
|||||||
if ($devType =~ /CUL_HM/){
|
if ($devType =~ /CUL_HM/){
|
||||||
my $model = AttrVal($device,"model","");
|
my $model = AttrVal($device,"model","");
|
||||||
|
|
||||||
|
my $readonly = AttrVal($device,"readOnly",0);
|
||||||
|
if ($readonly) {
|
||||||
|
Log3 $me, 4, "$me(getDeviceType): $devHash->{NAME} is readonly - ignored";
|
||||||
|
return undef;
|
||||||
|
}
|
||||||
|
|
||||||
#models: HM-TC-IT-WM-W-EU, HM-CC-RT-DN, HM-CC-TC
|
#models: HM-TC-IT-WM-W-EU, HM-CC-RT-DN, HM-CC-TC
|
||||||
unless ($model =~ m/.*HM-[C|T]C-.*/) {
|
unless ($model =~ m/.*HM-[C|T]C-.*/) {
|
||||||
Log3 $me, 4, "$me(getDeviceType): $devHash->{NAME}, model $model is not supported";
|
Log3 $me, 4, "$me(getDeviceType): $devHash->{NAME}, model $model is not supported";
|
||||||
@ -149,13 +165,19 @@ sub weekprofile_getDeviceType($$;$)
|
|||||||
|
|
||||||
$type = "CUL_HM" if ( ($model =~ m/.*HM-CC-RT.*/) && ($channel == 4) );
|
$type = "CUL_HM" if ( ($model =~ m/.*HM-CC-RT.*/) && ($channel == 4) );
|
||||||
$type = "CUL_HM" if ( ($model =~ m/.*HM-TC.*/) && ($channel == 2) );
|
$type = "CUL_HM" if ( ($model =~ m/.*HM-TC.*/) && ($channel == 2) );
|
||||||
$type = "CUL_HM" if ( ($model =~ m/.*HM-CC-TC.*/) && ($channel == 2) );
|
$type = "CUL_HM" if ( ($model =~ m/.*HM-CC-TC.*/) && ($channel == 2) );
|
||||||
}
|
}
|
||||||
#avoid max shutter contact
|
#avoid max shutter contact
|
||||||
elsif ( ($devType =~ /MAX/) && ($devHash->{type} =~ /.*Thermostat.*/) ){
|
elsif ( ($devType =~ /MAX/) && ($devHash->{type} =~ /.*Thermostat.*/) ){
|
||||||
$type = "MAX";
|
$type = "MAX";
|
||||||
}
|
}
|
||||||
elsif ( $devType =~ /HMCCUDEV/){
|
elsif ( $devType =~ /HMCCUDEV/){
|
||||||
|
my $readonly = AttrVal($device,"readOnly",0);
|
||||||
|
if ($readonly) {
|
||||||
|
Log3 $me, 4, "$me(getDeviceType): $devHash->{NAME} is readonly - ignored";
|
||||||
|
return undef;
|
||||||
|
}
|
||||||
|
|
||||||
my $model = $devHash->{ccutype};
|
my $model = $devHash->{ccutype};
|
||||||
if (!defined($model)) {
|
if (!defined($model)) {
|
||||||
Log3 $me, 2, "$me(getDeviceType): ccutype not defined - take HM-xxx (HMCCU_HM)";
|
Log3 $me, 2, "$me(getDeviceType): ccutype not defined - take HM-xxx (HMCCU_HM)";
|
||||||
|
Loading…
Reference in New Issue
Block a user