From 40f30675dd25713a1f25f00159d303874c96c07b Mon Sep 17 00:00:00 2001 From: Jan-Philipp Benecke Date: Tue, 19 Dec 2023 10:35:19 +0100 Subject: [PATCH] Remove gree switch entity description required fields mixin (#105849) --- 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 b9c8491e0f1a..07e882233060 100644 --- a/homeassistant/components/gree/switch.py +++ b/homeassistant/components/gree/switch.py @@ -21,19 +21,14 @@ from .const import COORDINATORS, DISPATCH_DEVICE_DISCOVERED, DOMAIN 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