mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Remove PVOutput entity descriptions required fields mixins (#103993)
This commit is contained in:
parent
e9c6da9803
commit
3359619436
@ -28,20 +28,13 @@ from .const import CONF_SYSTEM_ID, DOMAIN
|
|||||||
from .coordinator import PVOutputDataUpdateCoordinator
|
from .coordinator import PVOutputDataUpdateCoordinator
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass(kw_only=True)
|
||||||
class PVOutputSensorEntityDescriptionMixin:
|
class PVOutputSensorEntityDescription(SensorEntityDescription):
|
||||||
"""Mixin for required keys."""
|
"""Describes a PVOutput sensor entity."""
|
||||||
|
|
||||||
value_fn: Callable[[Status], int | float | None]
|
value_fn: Callable[[Status], int | float | None]
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
|
||||||
class PVOutputSensorEntityDescription(
|
|
||||||
SensorEntityDescription, PVOutputSensorEntityDescriptionMixin
|
|
||||||
):
|
|
||||||
"""Describes a PVOutput sensor entity."""
|
|
||||||
|
|
||||||
|
|
||||||
SENSORS: tuple[PVOutputSensorEntityDescription, ...] = (
|
SENSORS: tuple[PVOutputSensorEntityDescription, ...] = (
|
||||||
PVOutputSensorEntityDescription(
|
PVOutputSensorEntityDescription(
|
||||||
key="energy_consumption",
|
key="energy_consumption",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user