From 65f2c74cb09a41b2ae3aaecbdaf2c8b49ecbc7be Mon Sep 17 00:00:00 2001 From: Joost Lekkerkerker Date: Mon, 11 Mar 2024 11:46:21 +0100 Subject: [PATCH] Remove entity description mixin in Wallbox (#112969) --- homeassistant/components/wallbox/number.py | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/homeassistant/components/wallbox/number.py b/homeassistant/components/wallbox/number.py index f09321a0849..8ae4c473299 100644 --- a/homeassistant/components/wallbox/number.py +++ b/homeassistant/components/wallbox/number.py @@ -39,22 +39,15 @@ def min_charging_current_value(coordinator: WallboxCoordinator) -> float: return 6 -@dataclass(frozen=True) -class WallboxNumberEntityDescriptionMixin: - """Load entities from different handlers.""" +@dataclass(frozen=True, kw_only=True) +class WallboxNumberEntityDescription(NumberEntityDescription): + """Describes Wallbox number entity.""" max_value_fn: Callable[[WallboxCoordinator], float] min_value_fn: Callable[[WallboxCoordinator], float] set_value_fn: Callable[[WallboxCoordinator], Callable[[float], Awaitable[None]]] -@dataclass(frozen=True) -class WallboxNumberEntityDescription( - NumberEntityDescription, WallboxNumberEntityDescriptionMixin -): - """Describes Wallbox number entity.""" - - NUMBER_TYPES: dict[str, WallboxNumberEntityDescription] = { CHARGER_MAX_CHARGING_CURRENT_KEY: WallboxNumberEntityDescription( key=CHARGER_MAX_CHARGING_CURRENT_KEY,