Skip to content

Commit

Permalink
Remove gree switch entity description required fields mixin (#105849)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpbede authored Dec 19, 2023
1 parent ed9e738 commit 40f3067
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions homeassistant/components/gree/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,14 @@
from .entity import GreeEntity


@dataclass(frozen=True)
class GreeRequiredKeysMixin:
"""Mixin for required keys."""
@dataclass(kw_only=True, frozen=True)
class GreeSwitchEntityDescription(SwitchEntityDescription):
"""Describes a Gree switch entity."""

get_value_fn: Callable[[Device], bool]
set_value_fn: Callable[[Device, bool], None]


@dataclass(frozen=True)
class GreeSwitchEntityDescription(SwitchEntityDescription, GreeRequiredKeysMixin):
"""Describes Gree switch entity."""


def _set_light(device: Device, value: bool) -> None:
"""Typed helper to set device light property."""
device.light = value
Expand Down

0 comments on commit 40f3067

Please sign in to comment.