1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-25 21:47:08 +00:00

Remove entity description mixin in Wallbox (#112969)

This commit is contained in:
Joost Lekkerkerker
2024-03-11 11:46:21 +01:00
committed by GitHub
parent 53613e69f2
commit 65f2c74cb0

View File

@@ -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,