mirror of https://github.com/Andre0512/hon.git
Fix mypy checks
This commit is contained in:
parent
3aadb840ab
commit
f007777689
|
@ -17,7 +17,7 @@ from .hon import HonEntity, unique_entities
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass(frozen=True)
|
||||||
class HonBinarySensorEntityDescription(BinarySensorEntityDescription):
|
class HonBinarySensorEntityDescription(BinarySensorEntityDescription):
|
||||||
on_value: str | float = ""
|
on_value: str | float = ""
|
||||||
|
|
||||||
|
|
|
@ -31,12 +31,12 @@ from .hon import HonEntity
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass(frozen=True)
|
||||||
class HonACClimateEntityDescription(ClimateEntityDescription):
|
class HonACClimateEntityDescription(ClimateEntityDescription):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass(frozen=True)
|
||||||
class HonClimateEntityDescription(ClimateEntityDescription):
|
class HonClimateEntityDescription(ClimateEntityDescription):
|
||||||
mode: HVACMode = HVACMode.AUTO
|
mode: HVACMode = HVACMode.AUTO
|
||||||
|
|
||||||
|
|
|
@ -19,12 +19,12 @@ from .const import DOMAIN
|
||||||
from .hon import HonEntity, unique_entities
|
from .hon import HonEntity, unique_entities
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass(frozen=True)
|
||||||
class HonConfigNumberEntityDescription(NumberEntityDescription):
|
class HonConfigNumberEntityDescription(NumberEntityDescription):
|
||||||
entity_category: EntityCategory = EntityCategory.CONFIG
|
entity_category: EntityCategory = EntityCategory.CONFIG
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass(frozen=True)
|
||||||
class HonNumberEntityDescription(NumberEntityDescription):
|
class HonNumberEntityDescription(NumberEntityDescription):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
|
@ -18,12 +18,12 @@ from .hon import HonEntity, unique_entities, get_readable
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass(frozen=True)
|
||||||
class HonSelectEntityDescription(SelectEntityDescription):
|
class HonSelectEntityDescription(SelectEntityDescription):
|
||||||
option_list: dict[int, str] | None = None
|
option_list: dict[int, str] | None = None
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass(frozen=True)
|
||||||
class HonConfigSelectEntityDescription(SelectEntityDescription):
|
class HonConfigSelectEntityDescription(SelectEntityDescription):
|
||||||
entity_category: EntityCategory = EntityCategory.CONFIG
|
entity_category: EntityCategory = EntityCategory.CONFIG
|
||||||
option_list: dict[int, str] | None = None
|
option_list: dict[int, str] | None = None
|
||||||
|
|
|
@ -34,13 +34,13 @@ from .hon import HonEntity, unique_entities, get_readable
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass(frozen=True)
|
||||||
class HonConfigSensorEntityDescription(SensorEntityDescription):
|
class HonConfigSensorEntityDescription(SensorEntityDescription):
|
||||||
entity_category: EntityCategory = EntityCategory.DIAGNOSTIC
|
entity_category: EntityCategory = EntityCategory.DIAGNOSTIC
|
||||||
option_list: dict[int, str] | None = None
|
option_list: dict[int, str] | None = None
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass(frozen=True)
|
||||||
class HonSensorEntityDescription(SensorEntityDescription):
|
class HonSensorEntityDescription(SensorEntityDescription):
|
||||||
option_list: dict[int, str] | None = None
|
option_list: dict[int, str] | None = None
|
||||||
|
|
||||||
|
|
|
@ -18,17 +18,18 @@ from .hon import HonEntity, unique_entities
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass(frozen=True)
|
||||||
class HonControlSwitchEntityDescription(SwitchEntityDescription):
|
class HonControlSwitchEntityDescription(SwitchEntityDescription):
|
||||||
turn_on_key: str = ""
|
turn_on_key: str = ""
|
||||||
turn_off_key: str = ""
|
turn_off_key: str = ""
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass(frozen=True)
|
||||||
class HonSwitchEntityDescription(SwitchEntityDescription):
|
class HonSwitchEntityDescription(SwitchEntityDescription):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass(frozen=True)
|
||||||
class HonConfigSwitchEntityDescription(SwitchEntityDescription):
|
class HonConfigSwitchEntityDescription(SwitchEntityDescription):
|
||||||
entity_category: EntityCategory = EntityCategory.CONFIG
|
entity_category: EntityCategory = EntityCategory.CONFIG
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue