always call set_volume with integer values (#31418)

This commit is contained in:
Josh Bendavid 2020-02-02 23:50:30 +01:00 committed by GitHub
parent 826433b680
commit 96ede54a1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -316,7 +316,7 @@ class LgWebOSMediaPlayerEntity(MediaPlayerDevice):
@cmd
async def async_set_volume_level(self, volume):
"""Set volume level, range 0..1."""
tv_volume = volume * 100
tv_volume = int(round(volume * 100))
await self._client.set_volume(tv_volume)
@cmd