From 53613e69f269e0921789f101be190efc448ca4c7 Mon Sep 17 00:00:00 2001 From: Joost Lekkerkerker Date: Mon, 11 Mar 2024 11:44:37 +0100 Subject: [PATCH] Remove entity description mixin in QNAP QSW (#112924) --- homeassistant/components/qnap_qsw/button.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/homeassistant/components/qnap_qsw/button.py b/homeassistant/components/qnap_qsw/button.py index 1a11a5209c0..091c6786a92 100644 --- a/homeassistant/components/qnap_qsw/button.py +++ b/homeassistant/components/qnap_qsw/button.py @@ -23,18 +23,13 @@ from .coordinator import QswDataCoordinator from .entity import QswDataEntity -@dataclass(frozen=True) -class QswButtonDescriptionMixin: - """Mixin to describe a Button entity.""" +@dataclass(frozen=True, kw_only=True) +class QswButtonDescription(ButtonEntityDescription): + """Class to describe a Button entity.""" press_action: Callable[[QnapQswApi], Awaitable[bool]] -@dataclass(frozen=True) -class QswButtonDescription(ButtonEntityDescription, QswButtonDescriptionMixin): - """Class to describe a Button entity.""" - - BUTTON_TYPES: Final[tuple[QswButtonDescription, ...]] = ( QswButtonDescription( device_class=ButtonDeviceClass.RESTART,