work: Низкий уровень работы с Элика завершен. Добавил логику для отслеживания состояния вытяжки.

This commit is contained in:
2026-09-22 22:01:57 +03:00
parent 8ece9ba131
commit 4169b0c3e5
4 changed files with 139 additions and 3 deletions
+19
View File
@@ -37,3 +37,22 @@ class ElicaState:
return result
@dataclass(frozen=True, slots=True)
class ElicaPanelState:
speed_leds: tuple[bool, bool, bool, bool] = (
False, False, False, False
)
power_led: bool = False
def to_dict(self) -> dict:
return asdict(self)
@dataclass(frozen=True, slots=True)
class ElicaLogicalState:
power: bool = False
speed: int = 0
timer: bool = False
def to_dict(self) -> dict:
return asdict(self)