Skip to content

Commit

Permalink
Add support set shuffle #446
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexxIT committed Jan 18, 2025
1 parent 0d3cd00 commit 9432d39
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions custom_components/yandex_station/core/yandex_station.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
| MediaPlayerEntityFeature.PAUSE
| MediaPlayerEntityFeature.SELECT_SOURCE
| MediaPlayerEntityFeature.REPEAT_SET
| MediaPlayerEntityFeature.SHUFFLE_SET
)

SOUND_MODE1 = "Произнеси текст"
Expand Down Expand Up @@ -754,6 +755,9 @@ async def async_set_repeat(self, repeat: RepeatMode):
mode = modes.get(repeat, "None")
await self.glagol.send({"command": "repeat", "mode": mode})

async def async_set_shuffle(self, shuffle: bool) -> None:
await self.glagol.send({"command": "shuffle", "enable": shuffle})

async def async_update(self):
# update online only while cloud connected
if self.local_state:
Expand Down

0 comments on commit 9432d39

Please sign in to comment.