mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 16:57:53 +00:00
Bump python-vlc-telnet to 2.0.1 (#46608)
Includes corresponding Home Assistant changes to avoid introducing regressions.
This commit is contained in:
parent
a6912277eb
commit
713544e5eb
@ -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
|
||||
|
@ -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"]
|
||||
}
|
||||
|
@ -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):
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user