Remove entity description mixin in SleepIQ (#112940)
This commit is contained in:
parent
fb23d5e6fb
commit
37e0a9d9c7
2 changed files with 6 additions and 20 deletions
|
@ -31,9 +31,9 @@ from .coordinator import SleepIQData, SleepIQDataUpdateCoordinator
|
|||
from .entity import SleepIQBedEntity, sleeper_for_side
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class SleepIQNumberEntityDescriptionMixin:
|
||||
"""Mixin to describe a SleepIQ number entity."""
|
||||
@dataclass(frozen=True, kw_only=True)
|
||||
class SleepIQNumberEntityDescription(NumberEntityDescription):
|
||||
"""Class to describe a SleepIQ number entity."""
|
||||
|
||||
value_fn: Callable[[Any], float]
|
||||
set_value_fn: Callable[[Any, int], Coroutine[None, None, None]]
|
||||
|
@ -41,13 +41,6 @@ class SleepIQNumberEntityDescriptionMixin:
|
|||
get_unique_id_fn: Callable[[SleepIQBed, Any], str]
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class SleepIQNumberEntityDescription(
|
||||
NumberEntityDescription, SleepIQNumberEntityDescriptionMixin
|
||||
):
|
||||
"""Class to describe a SleepIQ number entity."""
|
||||
|
||||
|
||||
async def _async_set_firmness(sleeper: SleepIQSleeper, firmness: int) -> None:
|
||||
await sleeper.set_sleepnumber(firmness)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue