Remove entity description mixin in Starlink (#112943)
This commit is contained in:
parent
e696afabe7
commit
e4b43680e1
5 changed files with 15 additions and 50 deletions
|
@ -32,20 +32,13 @@ async def async_setup_entry(
|
|||
)
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class StarlinkBinarySensorEntityDescriptionMixin:
|
||||
"""Mixin for required keys."""
|
||||
@dataclass(frozen=True, kw_only=True)
|
||||
class StarlinkBinarySensorEntityDescription(BinarySensorEntityDescription):
|
||||
"""Describes a Starlink binary sensor entity."""
|
||||
|
||||
value_fn: Callable[[StarlinkData], bool | None]
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class StarlinkBinarySensorEntityDescription(
|
||||
BinarySensorEntityDescription, StarlinkBinarySensorEntityDescriptionMixin
|
||||
):
|
||||
"""Describes a Starlink binary sensor entity."""
|
||||
|
||||
|
||||
class StarlinkBinarySensorEntity(StarlinkEntity, BinarySensorEntity):
|
||||
"""A BinarySensorEntity for Starlink devices. Handles creating unique IDs."""
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue