mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Remove Wiz entity descriptions required fields mixins (#104005)
This commit is contained in:
parent
6f54aaf564
commit
560ac3d087
@ -22,21 +22,14 @@ from .entity import WizEntity
|
||||
from .models import WizData
|
||||
|
||||
|
||||
@dataclass
|
||||
class WizNumberEntityDescriptionMixin:
|
||||
"""Mixin to describe a WiZ number entity."""
|
||||
|
||||
value_fn: Callable[[wizlight], int | None]
|
||||
set_value_fn: Callable[[wizlight, int], Coroutine[None, None, None]]
|
||||
required_feature: str
|
||||
|
||||
|
||||
@dataclass
|
||||
class WizNumberEntityDescription(
|
||||
NumberEntityDescription, WizNumberEntityDescriptionMixin
|
||||
):
|
||||
@dataclass(kw_only=True)
|
||||
class WizNumberEntityDescription(NumberEntityDescription):
|
||||
"""Class to describe a WiZ number entity."""
|
||||
|
||||
required_feature: str
|
||||
set_value_fn: Callable[[wizlight, int], Coroutine[None, None, None]]
|
||||
value_fn: Callable[[wizlight], int | None]
|
||||
|
||||
|
||||
async def _async_set_speed(device: wizlight, speed: int) -> None:
|
||||
await device.set_speed(speed)
|
||||
|
Loading…
x
Reference in New Issue
Block a user