Fix media renderers without volume control (#44874)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
This commit is contained in:
parent
7c93a11aba
commit
58195c64b7
1 changed files with 3 additions and 1 deletions
|
@ -281,7 +281,9 @@ class DlnaDmrDevice(MediaPlayerEntity):
|
|||
@property
|
||||
def volume_level(self):
|
||||
"""Volume level of the media player (0..1)."""
|
||||
if self._device.has_volume_level:
|
||||
return self._device.volume_level
|
||||
return 0
|
||||
|
||||
@catch_request_errors()
|
||||
async def async_set_volume_level(self, volume):
|
||||
|
|
Loading…
Add table
Reference in a new issue