Skip to content

Commit

Permalink
Update yandex_station.py
Browse files Browse the repository at this point in the history
  • Loading branch information
glebsterx authored Nov 15, 2024
1 parent 312a5df commit c4b7963
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions custom_components/yandex_station/core/yandex_station.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ async def response(self, card: dict, request_id: str):
)

async def _set_brightness(self, value: str):
if self.device_platform not in ("yandexstation_2", "yandexmini_2", "cucumber"):
if self.device_platform not in ("yandexstation_2", "yandexmini_2", "cucumber", "plum", "bergamot"):
_LOGGER.warning("Поддерживаются только станции с экраном")
return

Expand Down Expand Up @@ -672,7 +672,7 @@ async def async_set_volume_level(self, volume: float):
else:
# на Яндекс ТВ Станция (2023) громкость от 0 до 100
# на колонках - от 0 до 10
k = 100 if self.platform == "magritte" else 10
k = 100 if self.platform in ["magritte", "monet"] else 10
await self.quasar.send(self.device, f"громкость на {round(k * volume)}")
if volume > 0:
self._attr_is_volume_muted = False
Expand Down Expand Up @@ -799,7 +799,7 @@ async def async_play_media(
}

elif media_type == "text":
# даже в локальном режиме делам TTS через облако, чтоб колонка
# даже в локальном режиме делаем TTS через облако, чтобы колонка
# не продолжала слушать
force_local: bool = extra and extra.get("force_local")
if self.quasar.session.x_token and not force_local:
Expand Down

0 comments on commit c4b7963

Please sign in to comment.