mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
fixed Timer Bugs for status updates
git-svn-id: https://svn.fhem.de/fhem/trunk@2060 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
a3cfbb6e0d
commit
9da28d3748
@ -54,7 +54,7 @@ YAMAHA_AVR_GetStatus($;$)
|
|||||||
my ($hash, $local) = @_;
|
my ($hash, $local) = @_;
|
||||||
my $name = $hash->{NAME};
|
my $name = $hash->{NAME};
|
||||||
my $power;
|
my $power;
|
||||||
$local = 0 if(!defined($local));
|
$local = 0 unless(defined($local));
|
||||||
|
|
||||||
return "" if(!defined($hash->{ADDRESS}) or !defined($hash->{INTERVAL}));
|
return "" if(!defined($hash->{ADDRESS}) or !defined($hash->{INTERVAL}));
|
||||||
|
|
||||||
@ -91,7 +91,7 @@ YAMAHA_AVR_GetStatus($;$)
|
|||||||
|
|
||||||
readingsEndUpdate($hash, 1);
|
readingsEndUpdate($hash, 1);
|
||||||
|
|
||||||
InternalTimer(gettimeofday()+$hash->{INTERVAL}, "YAMAHA_AVR_GetStatus", $hash, 1) unless $local == 0;
|
InternalTimer(gettimeofday()+$hash->{INTERVAL}, "YAMAHA_AVR_GetStatus", $hash, 1) unless($local == 1);
|
||||||
|
|
||||||
Log GetLogLevel($name,4), "YAMAHA_AVR $name: $hash->{STATE}";
|
Log GetLogLevel($name,4), "YAMAHA_AVR $name: $hash->{STATE}";
|
||||||
|
|
||||||
@ -353,7 +353,7 @@ YAMAHA_AVR_Define($$)
|
|||||||
}
|
}
|
||||||
$attr{$name}{"volume-smooth-change"} = "1";
|
$attr{$name}{"volume-smooth-change"} = "1";
|
||||||
|
|
||||||
InternalTimer(gettimeofday()+2, "YAMAHA_AVR_GetStatus", $hash, 0);
|
InternalTimer(gettimeofday()+2, "YAMAHA_AVR_GetStatus", ($hash, 0), 0);
|
||||||
|
|
||||||
return undef;
|
return undef;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user