From f86119aec760b480fbe26c4d2fb806ad9dfea1c6 Mon Sep 17 00:00:00 2001 From: Joost Lekkerkerker Date: Mon, 11 Mar 2024 12:03:50 +0100 Subject: [PATCH] Remove entity description mixin in Onvif (#112912) --- homeassistant/components/onvif/switch.py | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/homeassistant/components/onvif/switch.py b/homeassistant/components/onvif/switch.py index 004872606d3..02b48d20bef 100644 --- a/homeassistant/components/onvif/switch.py +++ b/homeassistant/components/onvif/switch.py @@ -17,9 +17,9 @@ from .device import ONVIFDevice from .models import Profile -@dataclass(frozen=True) -class ONVIFSwitchEntityDescriptionMixin: - """Mixin for required keys.""" +@dataclass(frozen=True, kw_only=True) +class ONVIFSwitchEntityDescription(SwitchEntityDescription): + """Describes ONVIF switch entity.""" turn_on_fn: Callable[ [ONVIFDevice], Callable[[Profile, Any], Coroutine[Any, Any, None]] @@ -32,13 +32,6 @@ class ONVIFSwitchEntityDescriptionMixin: supported_fn: Callable[[ONVIFDevice], bool] -@dataclass(frozen=True) -class ONVIFSwitchEntityDescription( - SwitchEntityDescription, ONVIFSwitchEntityDescriptionMixin -): - """Describes ONVIF switch entity.""" - - SWITCHES: tuple[ONVIFSwitchEntityDescription, ...] = ( ONVIFSwitchEntityDescription( key="autofocus",