diff --git a/custom_components/pioneer_async/media_player.py b/custom_components/pioneer_async/media_player.py index 77899c7..44658e8 100755 --- a/custom_components/pioneer_async/media_player.py +++ b/custom_components/pioneer_async/media_player.py @@ -301,15 +301,17 @@ def media_title(self): @property def device_state_attributes(self): """Return device specific state attributes.""" - attrs = {} - volume = self._pioneer.volume.get(self._zone) - max_volume = self._pioneer.max_volume.get(self._zone) + pioneer = self._pioneer + attrs = {"sources_json": json.dumps(pioneer.get_source_dict())} + volume = pioneer.volume.get(self._zone) + max_volume = pioneer.max_volume.get(self._zone) if volume is not None and max_volume is not None: if self._zone == "1": volume_db = volume / 2 - 80.5 else: volume_db = volume - 81 attrs = { + **attrs, "device_volume": volume, "device_max_volume": max_volume, "device_volume_db": volume_db,