Remove entity description mixin in Ecoforest (#112409)
This commit is contained in:
parent
362a10e82e
commit
dd3c11f179
3 changed files with 9 additions and 30 deletions
|
@ -16,20 +16,13 @@ from .coordinator import EcoforestCoordinator
|
|||
from .entity import EcoforestEntity
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class EcoforestRequiredKeysMixin:
|
||||
"""Mixin for required keys."""
|
||||
@dataclass(frozen=True, kw_only=True)
|
||||
class EcoforestNumberEntityDescription(NumberEntityDescription):
|
||||
"""Describes an ecoforest number entity."""
|
||||
|
||||
value_fn: Callable[[Device], float | None]
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class EcoforestNumberEntityDescription(
|
||||
NumberEntityDescription, EcoforestRequiredKeysMixin
|
||||
):
|
||||
"""Describes an ecoforest number entity."""
|
||||
|
||||
|
||||
NUMBER_ENTITIES = (
|
||||
EcoforestNumberEntityDescription(
|
||||
key="power_level",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue