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) = @_;
|
||||
|
||||
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));
|
||||
|
||||
# determine device type
|
||||
@ -127,6 +137,12 @@ sub weekprofile_getDeviceType($$;$)
|
||||
if ($devType =~ /CUL_HM/){
|
||||
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
|
||||
unless ($model =~ m/.*HM-[C|T]C-.*/) {
|
||||
Log3 $me, 4, "$me(getDeviceType): $devHash->{NAME}, model $model is not supported";
|
||||
@ -156,6 +172,12 @@ sub weekprofile_getDeviceType($$;$)
|
||||
$type = "MAX";
|
||||
}
|
||||
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};
|
||||
if (!defined($model)) {
|
||||
Log3 $me, 2, "$me(getDeviceType): ccutype not defined - take HM-xxx (HMCCU_HM)";
|
||||
|
Loading…
Reference in New Issue
Block a user