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
|
@ -21,20 +21,13 @@ from .coordinator import V2CUpdateCoordinator
|
|||
from .entity import V2CBaseEntity
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class V2CRequiredKeysMixin:
|
||||
"""Mixin for required keys."""
|
||||
@dataclass(frozen=True, kw_only=True)
|
||||
class V2CBinarySensorEntityDescription(BinarySensorEntityDescription):
|
||||
"""Describes an EVSE binary sensor entity."""
|
||||
|
||||
value_fn: Callable[[Trydan], bool]
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class V2CBinarySensorEntityDescription(
|
||||
BinarySensorEntityDescription, V2CRequiredKeysMixin
|
||||
):
|
||||
"""Describes an EVSE binary sensor entity."""
|
||||
|
||||
|
||||
TRYDAN_SENSORS = (
|
||||
V2CBinarySensorEntityDescription(
|
||||
key="connected",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue