mirror of
https://github.com/home-assistant/core.git
synced 2025-07-09 22:37:11 +00:00
Remove entity description mixin in EnergyZero (#112412)
This commit is contained in:
parent
0153c1840f
commit
86503526ee
@ -29,21 +29,14 @@ from .const import DOMAIN, SERVICE_TYPE_DEVICE_NAMES
|
||||
from .coordinator import EnergyZeroData, EnergyZeroDataUpdateCoordinator
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class EnergyZeroSensorEntityDescriptionMixin:
|
||||
"""Mixin for required keys."""
|
||||
@dataclass(frozen=True, kw_only=True)
|
||||
class EnergyZeroSensorEntityDescription(SensorEntityDescription):
|
||||
"""Describes an EnergyZero sensor entity."""
|
||||
|
||||
value_fn: Callable[[EnergyZeroData], float | datetime | None]
|
||||
service_type: str
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class EnergyZeroSensorEntityDescription(
|
||||
SensorEntityDescription, EnergyZeroSensorEntityDescriptionMixin
|
||||
):
|
||||
"""Describes a Pure Energie sensor entity."""
|
||||
|
||||
|
||||
SENSORS: tuple[EnergyZeroSensorEntityDescription, ...] = (
|
||||
EnergyZeroSensorEntityDescription(
|
||||
key="current_hour_price",
|
||||
|
Loading…
x
Reference in New Issue
Block a user