Remove entity description mixin in Pi-hole (#112919)

This commit is contained in:
Joost Lekkerkerker 2024-03-11 12:03:13 +01:00 committed by GitHub
parent 8391dd39d9
commit e08fb68597
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -22,19 +22,11 @@ from . import PiHoleEntity
from .const import DATA_KEY_API, DATA_KEY_COORDINATOR, DOMAIN as PIHOLE_DOMAIN
@dataclass(frozen=True)
class RequiredPiHoleBinaryDescription:
"""Represent the required attributes of the PiHole binary description."""
state_value: Callable[[Hole], bool]
@dataclass(frozen=True)
class PiHoleBinarySensorEntityDescription(
BinarySensorEntityDescription, RequiredPiHoleBinaryDescription
):
@dataclass(frozen=True, kw_only=True)
class PiHoleBinarySensorEntityDescription(BinarySensorEntityDescription):
"""Describes PiHole binary sensor entity."""
state_value: Callable[[Hole], bool]
extra_value: Callable[[Hole], dict[str, Any] | None] = lambda api: None