diff --git a/fhem/CHANGED b/fhem/CHANGED index d002077f3..2726257cb 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,6 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. + - feature: 89_FULLY: Added support for attribute disable - change: 93_DbLog: V3.7.0, log verbose 5 enhanced, configuration read check added to configCheck - feature: 74_Unifi: new Readings for WLAN-states, fixed Warning diff --git a/fhem/FHEM/89_FULLY.pm b/fhem/FHEM/89_FULLY.pm index 2d39da4b2..55d8835e4 100755 --- a/fhem/FHEM/89_FULLY.pm +++ b/fhem/FHEM/89_FULLY.pm @@ -55,6 +55,7 @@ sub FULLY_Initialize ($) $hash->{parseParams} = 1; $hash->{AttrList} = "pingBeforeCmd:0,1,2 pollInterval requestTimeout repeatCommand:0,1,2 " . + "disable:0,1 " . $readingFnAttributes; } @@ -189,6 +190,9 @@ sub FULLY_Set ($@) "lock" => "enabledLockedMode", "unlock" => "disableLockedMode" ); + my $disable = AttrVal ($name, 'disable', 0); + return undef if ($disable); + if (exists ($cmds{$opt})) { $response = FULLY_Execute ($hash, $cmds{$opt}, undef, 1); } @@ -277,6 +281,9 @@ sub FULLY_Get ($@) my $options = "info:noArg stats:noArg update:noArg"; my $response; + my $disable = AttrVal ($name, 'disable', 0); + return undef if ($disable); + if ($opt eq 'info') { my $result = FULLY_Execute ($hash, 'deviceInfo', undef, 1); if (!defined ($result) || $result eq '') { @@ -373,8 +380,9 @@ sub FULLY_UpdateDeviceInfo ($) { my ($hash) = @_; my $name = $hash->{NAME}; + my $disable = AttrVal ($name, 'disable', 0); - if (!exists ($hash->{fully}{bc})) { + if (!exists ($hash->{fully}{bc}) && $disable == 0) { $hash->{fully}{bc} = BlockingCall ("FULLY_GetDeviceInfo", $name, "FULLY_GotDeviceInfo", 120, "FULLY_Abort", $hash); } @@ -641,6 +649,9 @@ sub FULLY_Ping ($$) Attributes