From 335961943666efdc28c48407ca8fcfae52363729 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Wed, 15 Nov 2023 03:50:11 +0100 Subject: [PATCH] Remove PVOutput entity descriptions required fields mixins (#103993) --- homeassistant/components/pvoutput/sensor.py | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/homeassistant/components/pvoutput/sensor.py b/homeassistant/components/pvoutput/sensor.py index bcf869d3bba..d9ef71bee69 100644 --- a/homeassistant/components/pvoutput/sensor.py +++ b/homeassistant/components/pvoutput/sensor.py @@ -28,20 +28,13 @@ from .const import CONF_SYSTEM_ID, DOMAIN from .coordinator import PVOutputDataUpdateCoordinator -@dataclass -class PVOutputSensorEntityDescriptionMixin: - """Mixin for required keys.""" +@dataclass(kw_only=True) +class PVOutputSensorEntityDescription(SensorEntityDescription): + """Describes a PVOutput sensor entity.""" value_fn: Callable[[Status], int | float | None] -@dataclass -class PVOutputSensorEntityDescription( - SensorEntityDescription, PVOutputSensorEntityDescriptionMixin -): - """Describes a PVOutput sensor entity.""" - - SENSORS: tuple[PVOutputSensorEntityDescription, ...] = ( PVOutputSensorEntityDescription( key="energy_consumption",