mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 22:27:07 +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
|
from .const import DATA_KEY_API, DATA_KEY_COORDINATOR, DOMAIN as PIHOLE_DOMAIN
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
@dataclass(frozen=True, kw_only=True)
|
||||||
class RequiredPiHoleBinaryDescription:
|
class PiHoleBinarySensorEntityDescription(BinarySensorEntityDescription):
|
||||||
"""Represent the required attributes of the PiHole binary description."""
|
|
||||||
|
|
||||||
state_value: Callable[[Hole], bool]
|
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
|
||||||
class PiHoleBinarySensorEntityDescription(
|
|
||||||
BinarySensorEntityDescription, RequiredPiHoleBinaryDescription
|
|
||||||
):
|
|
||||||
"""Describes PiHole binary sensor entity."""
|
"""Describes PiHole binary sensor entity."""
|
||||||
|
|
||||||
|
state_value: Callable[[Hole], bool]
|
||||||
extra_value: Callable[[Hole], dict[str, Any] | None] = lambda api: None
|
extra_value: Callable[[Hole], dict[str, Any] | None] = lambda api: None
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user