mirror of
https://github.com/home-assistant/core.git
synced 2025-04-27 18:57:57 +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__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
@dataclass(frozen=True, kw_only=True)
|
||||||
class LaCrosseSensorEntityDescriptionMixin:
|
class LaCrosseSensorEntityDescription(SensorEntityDescription):
|
||||||
"""Mixin for required keys."""
|
"""Description for LaCrosse View sensor."""
|
||||||
|
|
||||||
value_fn: Callable[[Sensor, str], float | int | str | None]
|
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:
|
def get_value(sensor: Sensor, field: str) -> float | int | str | None:
|
||||||
"""Get the value of a sensor field."""
|
"""Get the value of a sensor field."""
|
||||||
field_data = sensor.data.get(field)
|
field_data = sensor.data.get(field)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user