Remove entity description mixin in PECO (#112915)
parent
e08fb68597
commit
b48032e37e
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue