diff --git a/fhem/contrib/AttrTemplate/99_sonos2mqttUtils.pm b/fhem/contrib/AttrTemplate/99_sonos2mqttUtils.pm index 90dd4cadb..4580dc0b0 100644 --- a/fhem/contrib/AttrTemplate/99_sonos2mqttUtils.pm +++ b/fhem/contrib/AttrTemplate/99_sonos2mqttUtils.pm @@ -343,7 +343,7 @@ if ($reading eq 'Input') { my $currentTrack_TrackUri = ReadingsVal($name,'currentTrack_TrackUri',''); return $currentTrack_TrackUri =~ 'x-rincon-stream' ? 'LineIn': $currentTrack_TrackUri =~ 'spdif' - ? 'TV' : ReadingsVal($name,'enqueuedMetadata_UpnpClass','') eq 'object.item.audioItem.audioBroadcast' or $currentTrack_TrackUri =~ 'x-rincon-mp3radio' + ? 'TV' : (ReadingsVal($name,'enqueuedMetadata_UpnpClass','') eq 'object.item.audioItem.audioBroadcast') or ($currentTrack_TrackUri =~ 'x-rincon-mp3radio') ? 'Radio' : 'Playlist' } }