From 39979b496d7f605b3b7dee92c68e5598cb82c1ab Mon Sep 17 00:00:00 2001 From: hexenmeister Date: Sun, 20 Mar 2016 19:37:02 +0000 Subject: [PATCH] fix: attribute disable does not work properly git-svn-id: https://svn.fhem.de/fhem/trunk@11105 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/42_SYSMON.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/fhem/FHEM/42_SYSMON.pm b/fhem/FHEM/42_SYSMON.pm index 12136a196..2b55917bc 100644 --- a/fhem/FHEM/42_SYSMON.pm +++ b/fhem/FHEM/42_SYSMON.pm @@ -38,7 +38,7 @@ use Data::Dumper; my $missingModulRemote; eval "use Net::Telnet;1" or $missingModulRemote .= "Net::Telnet "; -my $VERSION = "2.2.7"; +my $VERSION = "2.2.8"; use constant { PERL_VERSION => "perl_version", @@ -819,9 +819,12 @@ SYSMON_Attr($$$) if($attrName eq "disable") { RemoveInternalTimer($hash); - if($attrVal ne "0") + if($attrVal ne "1") { InternalTimer(gettimeofday()+$hash->{INTERVAL_BASE}, "SYSMON_Update", $hash, 0); + $hash->{STATE} = "Active"; + } else { + $hash->{STATE} = "Inactive"; } #$hash->{LOCAL} = 1; #SYSMON_Update($hash);