2021-05-15 05:54:11 +00:00
|
|
|
"""Models for the AVM FRITZ!SmartHome integration."""
|
|
|
|
from __future__ import annotations
|
|
|
|
|
2021-09-29 12:06:51 +00:00
|
|
|
from collections.abc import Callable
|
2021-08-27 15:09:34 +00:00
|
|
|
from dataclasses import dataclass
|
2021-09-29 12:06:51 +00:00
|
|
|
from typing import TypedDict
|
2021-08-27 15:09:34 +00:00
|
|
|
|
|
|
|
from pyfritzhome import FritzhomeDevice
|
|
|
|
|
2021-05-15 05:54:11 +00:00
|
|
|
|
2022-01-07 13:46:17 +00:00
|
|
|
@dataclass
|
|
|
|
class ClimateExtraAttributes(TypedDict, total=False):
|
2021-08-27 15:09:34 +00:00
|
|
|
"""TypedDict for climates extra attributes."""
|
|
|
|
|
2021-05-15 05:54:11 +00:00
|
|
|
battery_level: int
|
2021-11-25 11:34:04 +00:00
|
|
|
battery_low: bool
|
2021-05-15 05:54:11 +00:00
|
|
|
holiday_mode: bool
|
|
|
|
summer_mode: bool
|
|
|
|
window_open: bool
|
|
|
|
|
|
|
|
|
2021-08-27 15:09:34 +00:00
|
|
|
@dataclass
|
|
|
|
class FritzEntityDescriptionMixinBase:
|
|
|
|
"""Bases description mixin for Fritz!Smarthome entities."""
|
|
|
|
|
|
|
|
suitable: Callable[[FritzhomeDevice], bool]
|