Skip to content

Commit

Permalink
Fix yolink entity descriptions (home-assistant#106649)
Browse files Browse the repository at this point in the history
  • Loading branch information
emontnemery authored Dec 29, 2023
1 parent 853e4d8 commit 95d7a66
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions homeassistant/components/yolink/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,21 +48,13 @@
from .entity import YoLinkEntity


@dataclass(frozen=True)
class YoLinkSensorEntityDescriptionMixin:
"""Mixin for device type."""

exists_fn: Callable[[YoLinkDevice], bool] = lambda _: True


@dataclass(frozen=True)
class YoLinkSensorEntityDescription(
YoLinkSensorEntityDescriptionMixin, SensorEntityDescription
):
@dataclass(frozen=True, kw_only=True)
class YoLinkSensorEntityDescription(SensorEntityDescription):
"""YoLink SensorEntityDescription."""

value: Callable = lambda state: state
exists_fn: Callable[[YoLinkDevice], bool] = lambda _: True
should_update_entity: Callable = lambda state: True
value: Callable = lambda state: state


SENSOR_DEVICE_TYPE = [
Expand Down

0 comments on commit 95d7a66

Please sign in to comment.