From 4e6695e5cfb8dcb211d1b224a5015fe75a455d55 Mon Sep 17 00:00:00 2001 From: Jan-Philipp Benecke Date: Sat, 16 Dec 2023 08:15:37 +0100 Subject: [PATCH] Remove gree switch entity description required fields mixin --- homeassistant/components/gree/switch.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/homeassistant/components/gree/switch.py b/homeassistant/components/gree/switch.py index b9c8491e0f1a53..07e88223306073 100644 --- a/homeassistant/components/gree/switch.py +++ b/homeassistant/components/gree/switch.py @@ -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