diff --git a/fhem/CHANGED b/fhem/CHANGED index abd4e5b6e..881fa937b 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -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 diff --git a/fhem/FHEM/71_YAMAHA_AVR.pm b/fhem/FHEM/71_YAMAHA_AVR.pm index 32d9661ba..f908edd13 100755 --- a/fhem/FHEM/71_YAMAHA_AVR.pm +++ b/fhem/FHEM/71_YAMAHA_AVR.pm @@ -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 =~ /.*?(.+?)<\/Station>.*?<\/Meta_Info>/) @@ -1571,7 +1571,7 @@ YAMAHA_AVR_ParseResponse($$$) } else { - readingsBulkUpdate($hash, "currentStation", "", 0); + readingsBulkUpdateIfChanged($hash, "currentStation", ""); } if($data =~ /.*?(.+?)<\/Channel>.*?<\/Meta_Info>/) @@ -1580,7 +1580,7 @@ YAMAHA_AVR_ParseResponse($$$) } else { - readingsBulkUpdate($hash, "currentChannel", "", 0); + readingsBulkUpdateIfChanged($hash, "currentChannel", ""); } if($data =~ /.*?(.+?)<\/Album>.*?<\/Meta_Info>/) @@ -1589,7 +1589,7 @@ YAMAHA_AVR_ParseResponse($$$) } else { - readingsBulkUpdate($hash, "currentAlbum", "", 0); + readingsBulkUpdateIfChanged($hash, "currentAlbum", ""); } if($data =~ /.*?(.+?)<\/Song>.*?<\/Meta_Info>/) @@ -1615,7 +1615,7 @@ YAMAHA_AVR_ParseResponse($$$) } else { - readingsBulkUpdate($hash, "currentTitle", "", 0); + readingsBulkUpdateIfChanged($hash, "currentTitle", ""); } if($data =~ /(.+?)<\/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")