mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 04:37:06 +00:00
Remove entity description mixin in Honeywell (#112776)
This commit is contained in:
parent
24b7f03e31
commit
6e1981c43c
@ -37,21 +37,14 @@ def _get_temperature_sensor_unit(device: Device) -> str:
|
|||||||
return UnitOfTemperature.FAHRENHEIT
|
return UnitOfTemperature.FAHRENHEIT
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
@dataclass(frozen=True, kw_only=True)
|
||||||
class HoneywellSensorEntityDescriptionMixin:
|
class HoneywellSensorEntityDescription(SensorEntityDescription):
|
||||||
"""Mixin for required keys."""
|
"""Describes a Honeywell sensor entity."""
|
||||||
|
|
||||||
value_fn: Callable[[Device], Any]
|
value_fn: Callable[[Device], Any]
|
||||||
unit_fn: Callable[[Device], Any]
|
unit_fn: Callable[[Device], Any]
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
|
||||||
class HoneywellSensorEntityDescription(
|
|
||||||
SensorEntityDescription, HoneywellSensorEntityDescriptionMixin
|
|
||||||
):
|
|
||||||
"""Describes a Honeywell sensor entity."""
|
|
||||||
|
|
||||||
|
|
||||||
SENSOR_TYPES: tuple[HoneywellSensorEntityDescription, ...] = (
|
SENSOR_TYPES: tuple[HoneywellSensorEntityDescription, ...] = (
|
||||||
HoneywellSensorEntityDescription(
|
HoneywellSensorEntityDescription(
|
||||||
key=OUTDOOR_TEMPERATURE_STATUS_KEY,
|
key=OUTDOOR_TEMPERATURE_STATUS_KEY,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user