2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-19 12:46:03 +00:00

YAMAHA_AVR: create events even when current.* readings will be set to an empty string. (Forum: #60902)

git-svn-id: https://svn.fhem.de/fhem/trunk@12601 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
markusbloch 2016-11-19 17:59:32 +00:00
parent 541d74a6ff
commit 6d57f61bb0
2 changed files with 14 additions and 12 deletions

View File

@ -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: YAMAHA_AVR: create events even when current.* readings will be
set to an empty string. (Forum: #60902)
- bugfix: 10_ZWave: possible changes for multichannel devices (Forum #50176)
- new: 39_siri.pm: configuration of fhem/siri integration
39_alexa.pm: configuration of fhem/alexa integration

View File

@ -1486,12 +1486,12 @@ YAMAHA_AVR_ParseResponse($$$)
delete($hash->{helper}{CURRENT_INPUT_TAG}) if(exists($hash->{helper}{CURRENT_INPUT_TAG}));
delete($hash->{helper}{LAST_INPUT_TAG}) if(exists($hash->{helper}{LAST_INPUT_TAG}));
$hash->{helper}{SUPPORT_SHUFFLE_REPEAT} = 0;
readingsBulkUpdate($hash, "currentAlbum", "", 0);
readingsBulkUpdate($hash, "currentTitle", "", 0);
readingsBulkUpdate($hash, "currentChannel", "", 0);
readingsBulkUpdate($hash, "currentStation", "", 0);
readingsBulkUpdate($hash, "currentStationFrequency","", 0);
readingsBulkUpdate($hash, "currentArtist", "", 0);
readingsBulkUpdateIfChanged($hash, "currentAlbum", "");
readingsBulkUpdateIfChanged($hash, "currentTitle", "");
readingsBulkUpdateIfChanged($hash, "currentChannel", "");
readingsBulkUpdateIfChanged($hash, "currentStation", "");
readingsBulkUpdateIfChanged($hash, "currentStationFrequency","");
readingsBulkUpdateIfChanged($hash, "currentArtist", "");
}
}
@ -1558,7 +1558,7 @@ YAMAHA_AVR_ParseResponse($$$)
}
else
{
readingsBulkUpdate($hash, "currentArtist", "", 0);
readingsBulkUpdateIfChanged($hash, "currentArtist", "");
}
if($data =~ /<Meta_Info>.*?<Station>(.+?)<\/Station>.*?<\/Meta_Info>/)
@ -1571,7 +1571,7 @@ YAMAHA_AVR_ParseResponse($$$)
}
else
{
readingsBulkUpdate($hash, "currentStation", "", 0);
readingsBulkUpdateIfChanged($hash, "currentStation", "");
}
if($data =~ /<Meta_Info>.*?<Channel>(.+?)<\/Channel>.*?<\/Meta_Info>/)
@ -1580,7 +1580,7 @@ YAMAHA_AVR_ParseResponse($$$)
}
else
{
readingsBulkUpdate($hash, "currentChannel", "", 0);
readingsBulkUpdateIfChanged($hash, "currentChannel", "");
}
if($data =~ /<Meta_Info>.*?<Album>(.+?)<\/Album>.*?<\/Meta_Info>/)
@ -1589,7 +1589,7 @@ YAMAHA_AVR_ParseResponse($$$)
}
else
{
readingsBulkUpdate($hash, "currentAlbum", "", 0);
readingsBulkUpdateIfChanged($hash, "currentAlbum", "");
}
if($data =~ /<Meta_Info>.*?<Song>(.+?)<\/Song>.*?<\/Meta_Info>/)
@ -1615,7 +1615,7 @@ YAMAHA_AVR_ParseResponse($$$)
}
else
{
readingsBulkUpdate($hash, "currentTitle", "", 0);
readingsBulkUpdateIfChanged($hash, "currentTitle", "");
}
if($data =~ /<Playback_Info>(.+?)<\/Playback_Info>/)
@ -1635,7 +1635,7 @@ YAMAHA_AVR_ParseResponse($$$)
}
elsif(ReadingsVal($name, "currentStationFrequency", "") ne "")
{
readingsBulkUpdate($hash, "currentStationFrequency","", 0);
readingsBulkUpdateIfChanged($hash, "currentStationFrequency","");
}
}
elsif($arg eq "playShuffle")