Fix mypy checks

This commit is contained in:
Andre Basche 2024-01-11 00:41:49 +01:00
parent 3aadb840ab
commit f007777689
6 changed files with 12 additions and 11 deletions

View file

@ -17,7 +17,7 @@ from .hon import HonEntity, unique_entities
_LOGGER = logging.getLogger(__name__)
@dataclass
@dataclass(frozen=True)
class HonBinarySensorEntityDescription(BinarySensorEntityDescription):
on_value: str | float = ""

View file

@ -31,12 +31,12 @@ from .hon import HonEntity
_LOGGER = logging.getLogger(__name__)
@dataclass
@dataclass(frozen=True)
class HonACClimateEntityDescription(ClimateEntityDescription):
pass
@dataclass
@dataclass(frozen=True)
class HonClimateEntityDescription(ClimateEntityDescription):
mode: HVACMode = HVACMode.AUTO

View file

@ -19,12 +19,12 @@ from .const import DOMAIN
from .hon import HonEntity, unique_entities
@dataclass
@dataclass(frozen=True)
class HonConfigNumberEntityDescription(NumberEntityDescription):
entity_category: EntityCategory = EntityCategory.CONFIG
@dataclass
@dataclass(frozen=True)
class HonNumberEntityDescription(NumberEntityDescription):
pass

View file

@ -18,12 +18,12 @@ from .hon import HonEntity, unique_entities, get_readable
_LOGGER = logging.getLogger(__name__)
@dataclass
@dataclass(frozen=True)
class HonSelectEntityDescription(SelectEntityDescription):
option_list: dict[int, str] | None = None
@dataclass
@dataclass(frozen=True)
class HonConfigSelectEntityDescription(SelectEntityDescription):
entity_category: EntityCategory = EntityCategory.CONFIG
option_list: dict[int, str] | None = None

View file

@ -34,13 +34,13 @@ from .hon import HonEntity, unique_entities, get_readable
_LOGGER = logging.getLogger(__name__)
@dataclass
@dataclass(frozen=True)
class HonConfigSensorEntityDescription(SensorEntityDescription):
entity_category: EntityCategory = EntityCategory.DIAGNOSTIC
option_list: dict[int, str] | None = None
@dataclass
@dataclass(frozen=True)
class HonSensorEntityDescription(SensorEntityDescription):
option_list: dict[int, str] | None = None

View file

@ -18,17 +18,18 @@ from .hon import HonEntity, unique_entities
_LOGGER = logging.getLogger(__name__)
@dataclass
@dataclass(frozen=True)
class HonControlSwitchEntityDescription(SwitchEntityDescription):
turn_on_key: str = ""
turn_off_key: str = ""
@dataclass(frozen=True)
class HonSwitchEntityDescription(SwitchEntityDescription):
pass
@dataclass
@dataclass(frozen=True)
class HonConfigSwitchEntityDescription(SwitchEntityDescription):
entity_category: EntityCategory = EntityCategory.CONFIG