From 9bfe14601674a989c792461ad817e590a4d36512 Mon Sep 17 00:00:00 2001 From: Jan-Philipp Benecke Date: Sat, 16 Dec 2023 08:11:51 +0100 Subject: [PATCH] Remove sun entity description required fields mixin --- homeassistant/components/sun/sensor.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/homeassistant/components/sun/sensor.py b/homeassistant/components/sun/sensor.py index 0f867f9b7c425c..93460eaf1041e7 100644 --- a/homeassistant/components/sun/sensor.py +++ b/homeassistant/components/sun/sensor.py @@ -26,19 +26,14 @@ ENTITY_ID_SENSOR_FORMAT = SENSOR_DOMAIN + ".sun_{}" -@dataclass -class SunEntityDescriptionMixin: - """Mixin for required Sun base description keys.""" +@dataclass(kw_only=True) +class SunSensorEntityDescription(SensorEntityDescription): + """Describes a Sun sensor entity.""" value_fn: Callable[[Sun], StateType | datetime] signal: str -@dataclass -class SunSensorEntityDescription(SensorEntityDescription, SunEntityDescriptionMixin): - """Describes Sun sensor entity.""" - - SENSOR_TYPES: tuple[SunSensorEntityDescription, ...] = ( SunSensorEntityDescription( key="next_dawn",