work: Добавил интерфейс для управления кнопками вытяжки.

This commit is contained in:
2026-09-22 21:36:39 +03:00
parent f6e00842d8
commit 8ece9ba131
+21 -1
View File
@@ -408,4 +408,24 @@ class ElicaService:
f"Relay {relay} did not reach state {expected}; current state: {state}"
)
await asyncio.sleep(0.02)
await asyncio.sleep(0.02)
# ------------------------------------------------------------------
# Elica buttons
# ------------------------------------------------------------------
async def press_power(self) -> None:
"""Эмулирует нажатие кнопки Power."""
await self.pulse_relay(self._config.power_relay)
async def press_speed(self) -> None:
"""Эмулирует нажатие кнопки Speed."""
await self.pulse_relay(self._config.speed_relay)
async def press_light(self) -> None:
"""Эмулирует нажатие кнопки Light."""
await self.pulse_relay(self._config.light_relay)
async def press_timer(self) -> None:
"""Эмулирует нажатие кнопки Timer."""
await self.pulse_relay(self._config.timer_relay)