Skip to content

Commit

Permalink
Remove entity description mixin in EasyEnergy (#112407)
Browse files Browse the repository at this point in the history
  • Loading branch information
joostlek committed Mar 6, 2024
1 parent 807c3ca commit 0153c18
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions homeassistant/components/easyenergy/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,14 @@
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",
Expand Down

0 comments on commit 0153c18

Please sign in to comment.