Remove entity description mixin in V2C (#112960)
This commit is contained in:
parent
b914ac3185
commit
4b84954d17
4 changed files with 12 additions and 36 deletions
|
@ -26,18 +26,13 @@ from .entity import V2CBaseEntity
|
|||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class V2CRequiredKeysMixin:
|
||||
"""Mixin for required keys."""
|
||||
@dataclass(frozen=True, kw_only=True)
|
||||
class V2CSensorEntityDescription(SensorEntityDescription):
|
||||
"""Describes an EVSE Power sensor entity."""
|
||||
|
||||
value_fn: Callable[[TrydanData], float]
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class V2CSensorEntityDescription(SensorEntityDescription, V2CRequiredKeysMixin):
|
||||
"""Describes an EVSE Power sensor entity."""
|
||||
|
||||
|
||||
TRYDAN_SENSORS = (
|
||||
V2CSensorEntityDescription(
|
||||
key="charge_power",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue