2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-03 16:56:54 +00:00

PROPLANTA: state msg

git-svn-id: https://svn.fhem.de/fhem/trunk@9478 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
tpoitzsch 2015-10-17 11:13:01 +00:00
parent 42bda594a1
commit 2509c345a5

View File

@ -573,10 +573,12 @@ sub PROPLANTA_Start($)
$hash->{INTERVAL} = AttrVal( $name, "INTERVAL", $hash->{INTERVAL} );
readingsSingleUpdate($hash, "state", "disabled", 1) if AttrVal($name, "disable", 0 ) == 1;
if($hash->{INTERVAL} > 0) {
# reset timer if interval is defined
RemoveInternalTimer( $hash );
InternalTimer(gettimeofday() + $hash->{INTERVAL}, "PROPLANTA_Start", $hash, 1 );
InternalTimer(gettimeofday() + $hash->{INTERVAL}, "PROPLANTA_Start", $hash, 1 );
return undef if AttrVal($name, "disable", 0 ) == 1 && !$hash->{fhem}{LOCAL};
}