mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
PROPLANTA: bugfix
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@6857 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
c1e5962a58
commit
cd45781f71
@ -338,7 +338,9 @@ sub PROPLANTA_Set($@)
|
|||||||
when ("update")
|
when ("update")
|
||||||
{
|
{
|
||||||
PROPLANTA_Log $hash, 3, "set command: " . $a[1];
|
PROPLANTA_Log $hash, 3, "set command: " . $a[1];
|
||||||
|
$hash->{LOCAL} = 1;
|
||||||
PROPLANTA_Start($hash);
|
PROPLANTA_Start($hash);
|
||||||
|
$hash->{LOCAL} = 0;
|
||||||
}
|
}
|
||||||
default
|
default
|
||||||
{
|
{
|
||||||
@ -393,13 +395,15 @@ sub PROPLANTA_Start($)
|
|||||||
|
|
||||||
$hash->{Interval} = AttrVal( $name, "Interval", 3600 );
|
$hash->{Interval} = AttrVal( $name, "Interval", 3600 );
|
||||||
|
|
||||||
|
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,
|
||||||
0 );
|
1 );
|
||||||
|
}
|
||||||
|
|
||||||
if ( AttrVal( $name, 'URL', '') eq '' && not defined( $hash->{URL} ) )
|
if ( AttrVal( $name, 'URL', '') eq '' && not defined( $hash->{URL} ) )
|
||||||
{
|
{
|
||||||
@ -420,8 +424,7 @@ sub PROPLANTA_Start($)
|
|||||||
#####################################
|
#####################################
|
||||||
sub PROPLANTA_Run($)
|
sub PROPLANTA_Run($)
|
||||||
{
|
{
|
||||||
my ($string) = @_;
|
my ($name) = @_;
|
||||||
my ( $name, $server ) = split( "\\|", $string );
|
|
||||||
my $ptext=$name;
|
my $ptext=$name;
|
||||||
|
|
||||||
return unless ( defined($name) );
|
return unless ( defined($name) );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user