Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Wiz entity descriptions required fields mixins #104005

Merged
merged 1 commit into from
Nov 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 5 additions & 12 deletions homeassistant/components/wiz/number.py
Expand Up @@ -22,20 +22,13 @@
from .models import WizData


@dataclass
class WizNumberEntityDescriptionMixin:
"""Mixin to describe a WiZ number entity."""
@dataclass(kw_only=True)
class WizNumberEntityDescription(NumberEntityDescription):
"""Class 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
):
"""Class to describe a WiZ number entity."""
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:
Expand Down