From fc58bb09a17ce95d4a39f4f6bae6d1e45d68ef09 Mon Sep 17 00:00:00 2001 From: Jan-Philipp Benecke Date: Tue, 19 Dec 2023 10:30:35 +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 437f1626c9d03f..384e356fdd6eac 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(frozen=True) -class SunEntityDescriptionMixin: - """Mixin for required Sun base description keys.""" +@dataclass(kw_only=True, frozen=True) +class SunSensorEntityDescription(SensorEntityDescription): + """Describes a Sun sensor entity.""" value_fn: Callable[[Sun], StateType | datetime] signal: str -@dataclass(frozen=True) -class SunSensorEntityDescription(SensorEntityDescription, SunEntityDescriptionMixin): - """Describes Sun sensor entity.""" - - SENSOR_TYPES: tuple[SunSensorEntityDescription, ...] = ( SunSensorEntityDescription( key="next_dawn",