Remove entity description mixin in Starlink (#112943)

This commit is contained in:
Joost Lekkerkerker 2024-03-11 11:18:01 +01:00 committed by GitHub
parent e696afabe7
commit e4b43680e1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 15 additions and 50 deletions

View file

@ -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."""