Remove entity description mixin in PECO (#112915)

pull/111502/head
Joost Lekkerkerker 2024-03-11 12:03:33 +01:00 committed by GitHub
parent e08fb68597
commit b48032e37e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 10 deletions

View File

@ -25,21 +25,14 @@ from . import PECOCoordinatorData
from .const import ATTR_CONTENT, CONF_COUNTY, DOMAIN
@dataclass(frozen=True)
class PECOSensorEntityDescriptionMixin:
"""Mixin for required keys."""
@dataclass(frozen=True, kw_only=True)
class PECOSensorEntityDescription(SensorEntityDescription):
"""Description for PECO sensor."""
value_fn: Callable[[PECOCoordinatorData], int | str]
attribute_fn: Callable[[PECOCoordinatorData], dict[str, str]]
@dataclass(frozen=True)
class PECOSensorEntityDescription(
SensorEntityDescription, PECOSensorEntityDescriptionMixin
):
"""Description for PECO sensor."""
PARALLEL_UPDATES: Final = 0
SENSOR_LIST: tuple[PECOSensorEntityDescription, ...] = (
PECOSensorEntityDescription(