mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 18:57:06 +00:00
Remove entity description mixin in Pure Energie (#112923)
This commit is contained in:
parent
7730c3bcf3
commit
d29418ebf5
@ -23,20 +23,13 @@ from . import PureEnergieData, PureEnergieDataUpdateCoordinator
|
|||||||
from .const import DOMAIN
|
from .const import DOMAIN
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
@dataclass(frozen=True, kw_only=True)
|
||||||
class PureEnergieSensorEntityDescriptionMixin:
|
class PureEnergieSensorEntityDescription(SensorEntityDescription):
|
||||||
"""Mixin for required keys."""
|
"""Describes a Pure Energie sensor entity."""
|
||||||
|
|
||||||
value_fn: Callable[[PureEnergieData], int | float]
|
value_fn: Callable[[PureEnergieData], int | float]
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
|
||||||
class PureEnergieSensorEntityDescription(
|
|
||||||
SensorEntityDescription, PureEnergieSensorEntityDescriptionMixin
|
|
||||||
):
|
|
||||||
"""Describes a Pure Energie sensor entity."""
|
|
||||||
|
|
||||||
|
|
||||||
SENSORS: tuple[PureEnergieSensorEntityDescription, ...] = (
|
SENSORS: tuple[PureEnergieSensorEntityDescription, ...] = (
|
||||||
PureEnergieSensorEntityDescription(
|
PureEnergieSensorEntityDescription(
|
||||||
key="power_flow",
|
key="power_flow",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user