mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
59_HCS: Do not even start the check interval timer in case HCS is switched off.
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@15764 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
70f5863acd
commit
d4aa4fa8ae
@ -156,7 +156,6 @@ HCS_Notify($$) {
|
|||||||
delete $modules{HCS}{NotifyFn};
|
delete $modules{HCS}{NotifyFn};
|
||||||
delete $hash->{NTFY_ORDER} if($hash->{NTFY_ORDER});
|
delete $hash->{NTFY_ORDER} if($hash->{NTFY_ORDER});
|
||||||
|
|
||||||
|
|
||||||
HCS_DoInit($hash);
|
HCS_DoInit($hash);
|
||||||
|
|
||||||
return undef;
|
return undef;
|
||||||
@ -196,10 +195,12 @@ HCS_DoInit($) {
|
|||||||
HCS_setState($hash,$ret);
|
HCS_setState($hash,$ret);
|
||||||
|
|
||||||
RemoveInternalTimer($hash);
|
RemoveInternalTimer($hash);
|
||||||
|
if(ReadingsVal($name,"state","off") ne "off") {
|
||||||
my $timer = gettimeofday()+($attr{$name}{interval}*60);
|
my $timer = gettimeofday()+($attr{$name}{interval}*60);
|
||||||
InternalTimer($timer, "HCS_checkState", $hash, 0);
|
InternalTimer($timer, "HCS_checkState", $hash, 0);
|
||||||
$hash->{NEXTCHECK} = FmtTime($timer);
|
$hash->{NEXTCHECK} = FmtTime($timer);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return undef;
|
return undef;
|
||||||
}
|
}
|
||||||
@ -368,7 +369,7 @@ HCS_setState($$) {
|
|||||||
my $state;
|
my $state;
|
||||||
my $stateDevice;
|
my $stateDevice;
|
||||||
|
|
||||||
return if(ReadingsVal($name,"state","") eq "off");
|
return if(ReadingsVal($name,"state","off") eq "off");
|
||||||
|
|
||||||
if($heatDemand == 0) {
|
if($heatDemand == 0) {
|
||||||
$state = "idle";
|
$state = "idle";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user