Improve frontier_silicon media_player typing (#137080)

This commit is contained in:
Marc Mueller 2025-02-04 12:25:09 +01:00 committed by GitHub
parent ca53d97a6d
commit 64a40a3396
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -244,7 +244,7 @@ class AFSAPIDevice(MediaPlayerEntity):
"""Send volume up command."""
volume = await self.fs_device.get_volume()
volume = int(volume or 0) + 1
await self.fs_device.set_volume(min(volume, self._max_volume))
await self.fs_device.set_volume(min(volume, self._max_volume or 1))
async def async_volume_down(self) -> None:
"""Send volume down command."""