mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +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
|
||||
|
||||
|
||||
@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",
|
||||
|
Loading…
x
Reference in New Issue
Block a user