PROPLANTA: bugfix

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@6858 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
tpoitzsch 2014-11-01 20:12:20 +00:00
parent cd45781f71
commit fea36301e8

View File

@ -301,6 +301,8 @@ sub PROPLANTA_Define($$)
} }
$hash->{STATE} = "Initializing"; $hash->{STATE} = "Initializing";
$hash->{LOCAL} = 0;
$hash->{INTERVAL} = 3600;
RemoveInternalTimer($hash); RemoveInternalTimer($hash);
InternalTimer( gettimeofday() + 12, "PROPLANTA_Start", $hash, 0 ); InternalTimer( gettimeofday() + 12, "PROPLANTA_Start", $hash, 0 );
@ -393,13 +395,13 @@ sub PROPLANTA_Start($)
return unless (defined($hash->{NAME})); return unless (defined($hash->{NAME}));
$hash->{Interval} = AttrVal( $name, "Interval", 3600 ); $hash->{INTERVAL} = AttrVal( $name, "Interval", $hash->{INTERVAL} );
if(!$hash->{LOCAL} && $hash->{INTERVAL} > 0) { if(!$hash->{LOCAL} && $hash->{INTERVAL} > 0) {
# setup timer # setup timer
RemoveInternalTimer( $hash ); RemoveInternalTimer( $hash );
InternalTimer( InternalTimer(
gettimeofday() + $hash->{Interval}, gettimeofday() + $hash->{INTERVAL},
"PROPLANTA_Start", "PROPLANTA_Start",
$name, $name,
1 ); 1 );