Fix set volume level (#31731)
afsapi requires an `int` in the 0-20 range but we receive a `float` in the 0.0-1.0 range so we have to cast and offset itpull/31739/head
parent
3435281bd1
commit
15ed086ed2
|
@ -275,7 +275,7 @@ class AFSAPIDevice(MediaPlayerDevice):
|
|||
|
||||
async def async_set_volume_level(self, volume):
|
||||
"""Set volume command."""
|
||||
await self.fs_device.set_volume(volume)
|
||||
await self.fs_device.set_volume(int(volume * 20))
|
||||
|
||||
async def async_select_source(self, source):
|
||||
"""Select input source."""
|
||||
|
|
Loading…
Reference in New Issue