mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 15:17:35 +00:00
Remove entity description mixin in Opower (#112913)
This commit is contained in:
parent
e87e0d2d41
commit
981902dd8a
@ -25,18 +25,13 @@ from .const import DOMAIN
|
|||||||
from .coordinator import OpowerCoordinator
|
from .coordinator import OpowerCoordinator
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
@dataclass(frozen=True, kw_only=True)
|
||||||
class OpowerEntityDescriptionMixin:
|
class OpowerEntityDescription(SensorEntityDescription):
|
||||||
"""Mixin values for required keys."""
|
"""Class describing Opower sensors entities."""
|
||||||
|
|
||||||
value_fn: Callable[[Forecast], str | float]
|
value_fn: Callable[[Forecast], str | float]
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
|
||||||
class OpowerEntityDescription(SensorEntityDescription, OpowerEntityDescriptionMixin):
|
|
||||||
"""Class describing Opower sensors entities."""
|
|
||||||
|
|
||||||
|
|
||||||
# suggested_display_precision=0 for all sensors since
|
# suggested_display_precision=0 for all sensors since
|
||||||
# Opower provides 0 decimal points for all these.
|
# Opower provides 0 decimal points for all these.
|
||||||
# (for the statistics in the energy dashboard Opower does provide decimal points)
|
# (for the statistics in the energy dashboard Opower does provide decimal points)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user