Bump python-vlc-telnet to 2.0.1 (#46608)

Includes corresponding Home Assistant changes to avoid introducing
regressions.
This commit is contained in:
David McClosky 2021-02-16 06:32:53 -05:00 committed by GitHub
parent a6912277eb
commit 713544e5eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 9 deletions

View File

@ -510,7 +510,7 @@ homeassistant/components/vicare/* @oischinger
homeassistant/components/vilfo/* @ManneW
homeassistant/components/vivotek/* @HarlemSquirrel
homeassistant/components/vizio/* @raman325
homeassistant/components/vlc_telnet/* @rodripf
homeassistant/components/vlc_telnet/* @rodripf @dmcc
homeassistant/components/volkszaehler/* @fabaff
homeassistant/components/volumio/* @OnFreund
homeassistant/components/waqi/* @andrey-git

View File

@ -2,6 +2,6 @@
"domain": "vlc_telnet",
"name": "VLC media player Telnet",
"documentation": "https://www.home-assistant.io/integrations/vlc-telnet",
"requirements": ["python-telnet-vlc==1.0.4"],
"codeowners": ["@rodripf"]
"requirements": ["python-telnet-vlc==2.0.1"],
"codeowners": ["@rodripf", "@dmcc"]
}

View File

@ -37,6 +37,7 @@ DOMAIN = "vlc_telnet"
DEFAULT_NAME = "VLC-TELNET"
DEFAULT_PORT = 4212
MAX_VOLUME = 500
SUPPORT_VLC = (
SUPPORT_PAUSE
@ -210,17 +211,15 @@ class VlcDevice(MediaPlayerEntity):
"""Mute the volume."""
if mute:
self._volume_bkp = self._volume
self._volume = 0
self._vlc.set_volume("0")
self.set_volume_level(0)
else:
self._vlc.set_volume(str(self._volume_bkp))
self._volume = self._volume_bkp
self.set_volume_level(self._volume_bkp)
self._muted = mute
def set_volume_level(self, volume):
"""Set volume level, range 0..1."""
self._vlc.set_volume(str(volume * 500))
self._vlc.set_volume(volume * MAX_VOLUME)
self._volume = volume
def media_play(self):

View File

@ -1822,7 +1822,7 @@ python-tado==0.10.0
python-telegram-bot==13.1
# homeassistant.components.vlc_telnet
python-telnet-vlc==1.0.4
python-telnet-vlc==2.0.1
# homeassistant.components.twitch
python-twitch-client==0.6.0