Remove entity description mixin in Wallbox (#112969)
This commit is contained in:
parent
53613e69f2
commit
65f2c74cb0
1 changed files with 3 additions and 10 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue