mirror of
https://github.com/home-assistant/core.git
synced 2025-07-12 07:47:08 +00:00
Remove entity description mixin in Zeversolar (#112977)
This commit is contained in:
parent
5d231ed61f
commit
65624a9491
@ -23,20 +23,13 @@ from .coordinator import ZeversolarCoordinator
|
|||||||
from .entity import ZeversolarEntity
|
from .entity import ZeversolarEntity
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
@dataclass(frozen=True, kw_only=True)
|
||||||
class ZeversolarEntityDescriptionMixin:
|
class ZeversolarEntityDescription(SensorEntityDescription):
|
||||||
"""Mixin for required keys."""
|
"""Describes Zeversolar sensor entity."""
|
||||||
|
|
||||||
value_fn: Callable[[zeversolar.ZeverSolarData], zeversolar.kWh | zeversolar.Watt]
|
value_fn: Callable[[zeversolar.ZeverSolarData], zeversolar.kWh | zeversolar.Watt]
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
|
||||||
class ZeversolarEntityDescription(
|
|
||||||
SensorEntityDescription, ZeversolarEntityDescriptionMixin
|
|
||||||
):
|
|
||||||
"""Describes Zeversolar sensor entity."""
|
|
||||||
|
|
||||||
|
|
||||||
SENSOR_TYPES = (
|
SENSOR_TYPES = (
|
||||||
ZeversolarEntityDescription(
|
ZeversolarEntityDescription(
|
||||||
key="pac",
|
key="pac",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user