mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 18:57:06 +00:00
Remove entity description mixin in Tado (#112947)
This commit is contained in:
parent
d0f53c2c99
commit
a0d50ecdf5
@ -34,19 +34,12 @@ from .entity import TadoDeviceEntity, TadoZoneEntity
|
|||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
@dataclass(frozen=True, kw_only=True)
|
||||||
class TadoBinarySensorEntityDescriptionMixin:
|
class TadoBinarySensorEntityDescription(BinarySensorEntityDescription):
|
||||||
"""Mixin for required keys."""
|
"""Describes Tado binary sensor entity."""
|
||||||
|
|
||||||
state_fn: Callable[[Any], bool]
|
state_fn: Callable[[Any], bool]
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
|
||||||
class TadoBinarySensorEntityDescription(
|
|
||||||
BinarySensorEntityDescription, TadoBinarySensorEntityDescriptionMixin
|
|
||||||
):
|
|
||||||
"""Describes Tado binary sensor entity."""
|
|
||||||
|
|
||||||
attributes_fn: Callable[[Any], dict[Any, StateType]] | None = None
|
attributes_fn: Callable[[Any], dict[Any, StateType]] | None = None
|
||||||
|
|
||||||
|
|
||||||
|
@ -37,19 +37,12 @@ from .entity import TadoHomeEntity, TadoZoneEntity
|
|||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
@dataclass(frozen=True, kw_only=True)
|
||||||
class TadoSensorEntityDescriptionMixin:
|
class TadoSensorEntityDescription(SensorEntityDescription):
|
||||||
"""Mixin for required keys."""
|
"""Describes Tado sensor entity."""
|
||||||
|
|
||||||
state_fn: Callable[[Any], StateType]
|
state_fn: Callable[[Any], StateType]
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
|
||||||
class TadoSensorEntityDescription(
|
|
||||||
SensorEntityDescription, TadoSensorEntityDescriptionMixin
|
|
||||||
):
|
|
||||||
"""Describes Tado sensor entity."""
|
|
||||||
|
|
||||||
attributes_fn: Callable[[Any], dict[Any, StateType]] | None = None
|
attributes_fn: Callable[[Any], dict[Any, StateType]] | None = None
|
||||||
data_category: str | None = None
|
data_category: str | None = None
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user