Remove PVOutput entity descriptions required fields mixins (#103993)

This commit is contained in:
Franck Nijhof 2023-11-15 03:50:11 +01:00 committed by GitHub
parent e9c6da9803
commit 3359619436
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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",