mirror of
https://github.com/home-assistant/core.git
synced 2025-04-25 09:47:52 +00:00
Remove entity description mixin in LaCrosse View (#112900)
This commit is contained in:
parent
a85571c840
commit
d531b6e9b7
@ -36,20 +36,13 @@ from .const import DOMAIN
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class LaCrosseSensorEntityDescriptionMixin:
|
||||
"""Mixin for required keys."""
|
||||
@dataclass(frozen=True, kw_only=True)
|
||||
class LaCrosseSensorEntityDescription(SensorEntityDescription):
|
||||
"""Description for LaCrosse View sensor."""
|
||||
|
||||
value_fn: Callable[[Sensor, str], float | int | str | None]
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class LaCrosseSensorEntityDescription(
|
||||
SensorEntityDescription, LaCrosseSensorEntityDescriptionMixin
|
||||
):
|
||||
"""Description for LaCrosse View sensor."""
|
||||
|
||||
|
||||
def get_value(sensor: Sensor, field: str) -> float | int | str | None:
|
||||
"""Get the value of a sensor field."""
|
||||
field_data = sensor.data.get(field)
|
||||
|
Loading…
x
Reference in New Issue
Block a user