mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-03 16:56:54 +00:00
YAMAHA_BD: fixing wrong "off" events when player is turned on via set command (Forum: #44618), replace \t with spaces, minor code makeup
git-svn-id: https://svn.fhem.de/fhem/trunk@9996 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
641b183bf2
commit
1804a84f47
@ -1,5 +1,7 @@
|
||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
||||
# Do not insert empty lines here, update check depends on it.
|
||||
- bugfix: YAMAHA_BD: fix power off events when player is turned on
|
||||
via set command on
|
||||
- bugfix: 95_Dashboard: fixed javascript bug causing tabs not to load
|
||||
- feature: 36_DavisVantage.zip (author: "habeIchVergessen")
|
||||
Receive Davis Vantage Weather Stations with JeeLink
|
||||
|
@ -436,12 +436,7 @@ YAMAHA_BD_Set($@)
|
||||
return $usage;
|
||||
}
|
||||
|
||||
|
||||
# Call the GetStatus() Function to retrieve the new values after setting something (with local flag, so the internal timer is not getting interupted)
|
||||
YAMAHA_BD_GetStatus($hash, 1);
|
||||
|
||||
return undef;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -484,7 +479,6 @@ YAMAHA_BD_Define($$)
|
||||
$hash->{helper}{ON_INTERVAL}=$hash->{helper}{OFF_INTERVAL};
|
||||
}
|
||||
|
||||
|
||||
# start the status update timer
|
||||
$hash->{helper}{DISABLED} = 0 unless(exists($hash->{helper}{DISABLED}));
|
||||
YAMAHA_BD_ResetTimer($hash, 2);
|
||||
@ -595,7 +589,6 @@ YAMAHA_BD_ParseResponse($$$)
|
||||
readingsSingleUpdate($hash, "presence", "absent", 1);
|
||||
readingsSingleUpdate($hash, "state", "absent", 1);
|
||||
}
|
||||
|
||||
}
|
||||
elsif($data ne "")
|
||||
{
|
||||
@ -622,7 +615,6 @@ YAMAHA_BD_ParseResponse($$$)
|
||||
if($data =~ /<Error_Info>(.+?)<\/Error_Info>/)
|
||||
{
|
||||
readingsBulkUpdate($hash, "error", lc($1));
|
||||
|
||||
}
|
||||
}
|
||||
elsif($cmd eq "statusRequest" and $arg eq "systemConfig")
|
||||
@ -636,7 +628,6 @@ YAMAHA_BD_ParseResponse($$$)
|
||||
|
||||
$attr{$name}{"model"} = $hash->{MODEL};
|
||||
}
|
||||
|
||||
}
|
||||
elsif($cmd eq "statusRequest" and $arg eq "powerStatus")
|
||||
{
|
||||
@ -651,7 +642,6 @@ YAMAHA_BD_ParseResponse($$$)
|
||||
readingsBulkUpdate($hash, "power", lc($power));
|
||||
readingsBulkUpdate($hash, "state", lc($power));
|
||||
}
|
||||
|
||||
}
|
||||
elsif($cmd eq "on")
|
||||
{
|
||||
@ -668,8 +658,6 @@ YAMAHA_BD_ParseResponse($$$)
|
||||
Log3 $name, 3, "YAMAHA_BD ($name) - Could not set power to on";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
elsif($cmd eq "statusRequest" and $arg eq "trickPlayInfo")
|
||||
{
|
||||
if($data =~ /<Trick_Play>(.+?)<\/Trick_Play>/)
|
||||
@ -746,12 +734,10 @@ YAMAHA_BD_ParseResponse($$$)
|
||||
|
||||
readingsEndUpdate($hash, 1);
|
||||
|
||||
YAMAHA_BD_GetStatus($hash, 1) if($cmd ne "statusRequest");
|
||||
|
||||
YAMAHA_BD_GetStatus($hash, 1) if($cmd ne "statusRequest" and $cmd ne "on");
|
||||
}
|
||||
|
||||
$hash->{helper}{AVAILABLE} = ($err ? 0 : 1);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -834,8 +820,6 @@ sub YAMAHA_BD_formatTimestamp($)
|
||||
my ($sec) = sprintf("%02d", unpack("s", pack "s", hex(substr($hex, 4, 2))));
|
||||
|
||||
return "$hour:$min:$sec";
|
||||
|
||||
|
||||
}
|
||||
|
||||
1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user