Skip to content

Commit

Permalink
Fix media renderers without volume control (home-assistant#44874)
Browse files Browse the repository at this point in the history
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
  • Loading branch information
ocampana and balloob committed Jan 8, 2021
1 parent 7c93a11 commit 58195c6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion homeassistant/components/dlna_dmr/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,9 @@ def supported_features(self):
@property
def volume_level(self):
"""Volume level of the media player (0..1)."""
return self._device.volume_level
if self._device.has_volume_level:
return self._device.volume_level
return 0

@catch_request_errors()
async def async_set_volume_level(self, volume):
Expand Down

0 comments on commit 58195c6

Please sign in to comment.