mirror of
https://github.com/home-assistant/core.git
synced 2025-08-16 02:51:40 +02:00
Revert "Set volume_step in clementine media_player" (#106578)
Revert "Set volume_step in clementine media_player (#105666)"
This reverts commit 36eeb15fee
.
This commit is contained in:
@@ -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)
|
||||||
|
Reference in New Issue
Block a user