From b26f00bf3978d224e19f727089a0fdf415f0f242 Mon Sep 17 00:00:00 2001
From: Joost Lekkerkerker <joostlek@outlook.com>
Date: Sat, 9 Mar 2024 11:00:36 +0100
Subject: [PATCH] Remove entity description mixin in Goodwe (#112773)

---
 homeassistant/components/goodwe/button.py | 13 +++----------
 homeassistant/components/goodwe/number.py | 13 +++----------
 2 files changed, 6 insertions(+), 20 deletions(-)

diff --git a/homeassistant/components/goodwe/button.py b/homeassistant/components/goodwe/button.py
index 62d9151061b..d3d96a19a76 100644
--- a/homeassistant/components/goodwe/button.py
+++ b/homeassistant/components/goodwe/button.py
@@ -19,20 +19,13 @@ from .const import DOMAIN, KEY_DEVICE_INFO, KEY_INVERTER
 _LOGGER = logging.getLogger(__name__)
 
 
-@dataclass(frozen=True)
-class GoodweButtonEntityDescriptionRequired:
-    """Required attributes of GoodweButtonEntityDescription."""
+@dataclass(frozen=True, kw_only=True)
+class GoodweButtonEntityDescription(ButtonEntityDescription):
+    """Class describing Goodwe button entities."""
 
     action: Callable[[Inverter], Awaitable[None]]
 
 
-@dataclass(frozen=True)
-class GoodweButtonEntityDescription(
-    ButtonEntityDescription, GoodweButtonEntityDescriptionRequired
-):
-    """Class describing Goodwe button entities."""
-
-
 SYNCHRONIZE_CLOCK = GoodweButtonEntityDescription(
     key="synchronize_clock",
     translation_key="synchronize_clock",
diff --git a/homeassistant/components/goodwe/number.py b/homeassistant/components/goodwe/number.py
index 8bdcf13ae53..fc8b3864ae9 100644
--- a/homeassistant/components/goodwe/number.py
+++ b/homeassistant/components/goodwe/number.py
@@ -24,22 +24,15 @@ from .const import DOMAIN, KEY_DEVICE_INFO, KEY_INVERTER
 _LOGGER = logging.getLogger(__name__)
 
 
-@dataclass(frozen=True)
-class GoodweNumberEntityDescriptionBase:
-    """Required values when describing Goodwe number entities."""
+@dataclass(frozen=True, kw_only=True)
+class GoodweNumberEntityDescription(NumberEntityDescription):
+    """Class describing Goodwe number entities."""
 
     getter: Callable[[Inverter], Awaitable[int]]
     setter: Callable[[Inverter, int], Awaitable[None]]
     filter: Callable[[Inverter], bool]
 
 
-@dataclass(frozen=True)
-class GoodweNumberEntityDescription(
-    NumberEntityDescription, GoodweNumberEntityDescriptionBase
-):
-    """Class describing Goodwe number entities."""
-
-
 def _get_setting_unit(inverter: Inverter, setting: str) -> str:
     """Return the unit of an inverter setting."""
     return next((s.unit for s in inverter.settings() if s.id_ == setting), "")