1
mirror of https://github.com/home-assistant/core synced 2024-08-02 23:40:32 +02:00

Use MAX_VOLUME constant in vlc_telnet (#48491)

We also don't need to call `int()` anymore due to underlying fixes in
the python-vlc-telnet library.

I believe this is the last item extracted from PR #44776.
This commit is contained in:
David McClosky 2021-03-30 03:57:53 -04:00 committed by GitHub
parent 0082eca932
commit e47d576ee7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -126,7 +126,7 @@ class VlcDevice(MediaPlayerEntity):
if status:
if "volume" in status:
self._volume = int(status["volume"]) / 500.0
self._volume = status["volume"] / MAX_VOLUME
else:
self._volume = None
if "state" in status: