mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
Remove entity description mixin in EasyEnergy (#112407)
This commit is contained in:
parent
807c3ca76b
commit
0153c1840f
@ -29,21 +29,14 @@ from .const import DOMAIN, SERVICE_TYPE_DEVICE_NAMES
|
||||
from .coordinator import EasyEnergyData, EasyEnergyDataUpdateCoordinator
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class EasyEnergySensorEntityDescriptionMixin:
|
||||
"""Mixin for required keys."""
|
||||
@dataclass(frozen=True, kw_only=True)
|
||||
class EasyEnergySensorEntityDescription(SensorEntityDescription):
|
||||
"""Describes easyEnergy sensor entity."""
|
||||
|
||||
value_fn: Callable[[EasyEnergyData], float | datetime | None]
|
||||
service_type: str
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class EasyEnergySensorEntityDescription(
|
||||
SensorEntityDescription, EasyEnergySensorEntityDescriptionMixin
|
||||
):
|
||||
"""Describes easyEnergy sensor entity."""
|
||||
|
||||
|
||||
SENSORS: tuple[EasyEnergySensorEntityDescription, ...] = (
|
||||
EasyEnergySensorEntityDescription(
|
||||
key="current_hour_price",
|
||||
|
Loading…
x
Reference in New Issue
Block a user