mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 06:39:11 +00:00
YAMAHA_AVR: change values of reading "playStatus" values according to FHEM development guidelines AV (Forum: #60902)
git-svn-id: https://svn.fhem.de/fhem/trunk@14207 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
117d380eee
commit
3c40f56da8
@ -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.
|
||||
- change: 71_YAMAHA_AVR: changing values of reading values conform
|
||||
to FHEM AV guidelines ("stopped", "playing" or "paused")
|
||||
- bugfix 73_km200.pm: Errorlist unsorted timestamp part 3
|
||||
- bugfix: 76_SMAInverter: version 2.9.1, issues for some inverter types
|
||||
e.g. SunnyBoy systems
|
||||
|
@ -1643,7 +1643,7 @@ YAMAHA_AVR_ParseResponse($$$)
|
||||
{
|
||||
Log3 $name, 4, "YAMAHA_AVR ($name) - check for extended input informations on <$1>";
|
||||
|
||||
YAMAHA_AVR_SendCommand($hash, "<YAMAHA_AV cmd=\"GET\"><$1><Play_Info>GetParam</Play_Info></$1></YAMAHA_AV>", "statusRequest", "playInfo", {options => {can_fail => 1}});
|
||||
YAMAHA_AVR_SendCommand($hash, "<YAMAHA_AV cmd=\"GET\"><$1><Play_Info>GetParam</Play_Info></$1></YAMAHA_AV>", "statusRequest", "playInfo", {options => {can_fail => 1, input_tag => $1}});
|
||||
|
||||
if(!exists($hash->{helper}{LAST_INPUT_TAG}) or ($hash->{helper}{LAST_INPUT_TAG} ne $hash->{helper}{CURRENT_INPUT_TAG}) or $hash->{helper}{SUPPORT_SHUFFLE_REPEAT})
|
||||
{
|
||||
@ -1667,6 +1667,7 @@ YAMAHA_AVR_ParseResponse($$$)
|
||||
readingsBulkUpdateIfChanged($hash, "currentStation", "");
|
||||
readingsBulkUpdateIfChanged($hash, "currentStationFrequency","");
|
||||
readingsBulkUpdateIfChanged($hash, "currentArtist", "");
|
||||
readingsBulkUpdateIfChanged($hash, "playStatus", "stopped");
|
||||
}
|
||||
}
|
||||
|
||||
@ -1820,10 +1821,16 @@ YAMAHA_AVR_ParseResponse($$$)
|
||||
{
|
||||
readingsBulkUpdateIfChanged($hash, "currentTitle", "");
|
||||
}
|
||||
|
||||
|
||||
if($data =~ /<Playback_Info>(.+?)<\/Playback_Info>/)
|
||||
{
|
||||
readingsBulkUpdate($hash, "playStatus", lc($1));
|
||||
readingsBulkUpdate($hash, "playStatus", "stopped") if($1 eq "Stop");
|
||||
readingsBulkUpdate($hash, "playStatus", "playing") if($1 eq "Play");
|
||||
readingsBulkUpdate($hash, "playStatus", "paused") if($1 eq "Pause");
|
||||
}
|
||||
elsif($options->{input_tag} eq "Tuner")
|
||||
{
|
||||
readingsBulkUpdate($hash, "playStatus", "playing");
|
||||
}
|
||||
|
||||
if($data =~ /<Tuning>.*?<Freq><Current><Val>(\d+?)<\/Val><Exp>(\d+?)<\/Exp><Unit>(.*?)<\/Unit><\/Current>.*?<\/Tuning>/ or (YAMAHA_AVR_isModel_DSP($hash) and $data =~ /<Tuning>.*?<Freq><Val>(\d+?)<\/Val><Exp>(\d+?)<\/Exp><Unit>(.*?)<\/Unit><\/Freq>.*?<\/Tuning>/))
|
||||
|
Loading…
Reference in New Issue
Block a user