mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Remove entity description mixin in Pi-hole (#112919)
This commit is contained in:
parent
8391dd39d9
commit
e08fb68597
@ -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
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user