mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 09:47:13 +00:00
Revert "Set volume_step in clementine media_player" (#106578)
Revert "Set volume_step in clementine media_player (#105666)" This reverts commit 36eeb15feedac126b3465d3c522a858a9cc9ac2e.
This commit is contained in:
parent
104039e732
commit
72dd60e667
@ -65,7 +65,6 @@ class ClementineDevice(MediaPlayerEntity):
|
|||||||
| MediaPlayerEntityFeature.SELECT_SOURCE
|
| MediaPlayerEntityFeature.SELECT_SOURCE
|
||||||
| MediaPlayerEntityFeature.PLAY
|
| MediaPlayerEntityFeature.PLAY
|
||||||
)
|
)
|
||||||
_attr_volume_step = 4 / 100
|
|
||||||
|
|
||||||
def __init__(self, client, name):
|
def __init__(self, client, name):
|
||||||
"""Initialize the Clementine device."""
|
"""Initialize the Clementine device."""
|
||||||
@ -124,6 +123,16 @@ class ClementineDevice(MediaPlayerEntity):
|
|||||||
|
|
||||||
return None, None
|
return None, None
|
||||||
|
|
||||||
|
def volume_up(self) -> None:
|
||||||
|
"""Volume up the media player."""
|
||||||
|
newvolume = min(self._client.volume + 4, 100)
|
||||||
|
self._client.set_volume(newvolume)
|
||||||
|
|
||||||
|
def volume_down(self) -> None:
|
||||||
|
"""Volume down media player."""
|
||||||
|
newvolume = max(self._client.volume - 4, 0)
|
||||||
|
self._client.set_volume(newvolume)
|
||||||
|
|
||||||
def mute_volume(self, mute: bool) -> None:
|
def mute_volume(self, mute: bool) -> None:
|
||||||
"""Send mute command."""
|
"""Send mute command."""
|
||||||
self._client.set_volume(0)
|
self._client.set_volume(0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user