Remove entity description mixin in Opower (#112913)

This commit is contained in:
Joost Lekkerkerker 2024-03-11 11:03:06 +01:00 committed by GitHub
parent e87e0d2d41
commit 981902dd8a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -25,18 +25,13 @@ from .const import DOMAIN
from .coordinator import OpowerCoordinator
@dataclass(frozen=True)
class OpowerEntityDescriptionMixin:
"""Mixin values for required keys."""
@dataclass(frozen=True, kw_only=True)
class OpowerEntityDescription(SensorEntityDescription):
"""Class describing Opower sensors entities."""
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
# Opower provides 0 decimal points for all these.
# (for the statistics in the energy dashboard Opower does provide decimal points)