mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 09:16:53 +00:00
fixing crash of FHEM when longpoll is activated
git-svn-id: https://svn.fhem.de/fhem/trunk@3409 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
f79f3a5a4e
commit
2175581b3e
@ -207,11 +207,10 @@ YAMAHA_AVR_Set($@)
|
||||
|
||||
|
||||
return "No Argument given" if(!defined($a[1]));
|
||||
|
||||
|
||||
my $what = $a[1];
|
||||
my $usage = "Unknown argument $what, choose one of on off volume:slider,-80,1,16 input:".$inputs_comma." mute:on,off remoteControl:setup,up,down,left,right,return,option,display,enter scene:".$scenes_comma." statusRequest";
|
||||
|
||||
readingsBeginUpdate($hash);
|
||||
|
||||
if($what eq "on")
|
||||
{
|
||||
@ -220,8 +219,10 @@ YAMAHA_AVR_Set($@)
|
||||
if($result =~ /RC="0"/ and $result =~ /<Power><\/Power>/)
|
||||
{
|
||||
# As the receiver startup takes about 5 seconds, the status will be already set, if the return code of the command is 0.
|
||||
readingsBeginUpdate($hash);
|
||||
readingsBulkUpdate($hash, "power", "on");
|
||||
readingsBulkUpdate($hash, "state","on");
|
||||
readingsEndUpdate($hash, 1);
|
||||
return undef;
|
||||
}
|
||||
else
|
||||
@ -465,7 +466,6 @@ YAMAHA_AVR_Set($@)
|
||||
{
|
||||
return $usage;
|
||||
}
|
||||
readingsEndUpdate($hash, 1);
|
||||
|
||||
# Call the GetStatus() Function to retrieve the new values after setting something (with local flag, so the internal timer is not getting interupted)
|
||||
YAMAHA_AVR_GetStatus($hash, 1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user