From e08fb68597c5cbf302a2278539b096b8292084e5 Mon Sep 17 00:00:00 2001 From: Joost Lekkerkerker Date: Mon, 11 Mar 2024 12:03:13 +0100 Subject: [PATCH] Remove entity description mixin in Pi-hole (#112919) --- homeassistant/components/pi_hole/binary_sensor.py | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/homeassistant/components/pi_hole/binary_sensor.py b/homeassistant/components/pi_hole/binary_sensor.py index 4c49cf3a98d..0593d12faa7 100644 --- a/homeassistant/components/pi_hole/binary_sensor.py +++ b/homeassistant/components/pi_hole/binary_sensor.py @@ -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