Remove entity description mixin in Ecoforest (#112409)
This commit is contained in:
parent
362a10e82e
commit
dd3c11f179
3 changed files with 9 additions and 30 deletions
|
@ -33,20 +33,13 @@ STATUS_TYPE = [s.value for s in State]
|
|||
ALARM_TYPE = [a.value for a in Alarm] + ["none"]
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class EcoforestRequiredKeysMixin:
|
||||
"""Mixin for required keys."""
|
||||
@dataclass(frozen=True, kw_only=True)
|
||||
class EcoforestSensorEntityDescription(SensorEntityDescription):
|
||||
"""Describes Ecoforest sensor entity."""
|
||||
|
||||
value_fn: Callable[[Device], StateType]
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class EcoforestSensorEntityDescription(
|
||||
SensorEntityDescription, EcoforestRequiredKeysMixin
|
||||
):
|
||||
"""Describes Ecoforest sensor entity."""
|
||||
|
||||
|
||||
SENSOR_TYPES: tuple[EcoforestSensorEntityDescription, ...] = (
|
||||
EcoforestSensorEntityDescription(
|
||||
key="temperature",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue