work: Добавил интерфейс для управления кнопками вытяжки.
This commit is contained in:
+21
-1
@@ -408,4 +408,24 @@ class ElicaService:
|
|||||||
f"Relay {relay} did not reach state {expected}; current state: {state}"
|
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)
|
||||||
Reference in New Issue
Block a user