Remove entity description mixin in Honeywell (#112776)
This commit is contained in:
parent
24b7f03e31
commit
6e1981c43c
1 changed files with 3 additions and 10 deletions
|
@ -37,21 +37,14 @@ def _get_temperature_sensor_unit(device: Device) -> str:
|
|||
return UnitOfTemperature.FAHRENHEIT
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class HoneywellSensorEntityDescriptionMixin:
|
||||
"""Mixin for required keys."""
|
||||
@dataclass(frozen=True, kw_only=True)
|
||||
class HoneywellSensorEntityDescription(SensorEntityDescription):
|
||||
"""Describes a Honeywell sensor entity."""
|
||||
|
||||
value_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, ...] = (
|
||||
HoneywellSensorEntityDescription(
|
||||
key=OUTDOOR_TEMPERATURE_STATUS_KEY,
|
||||
|
|
Loading…
Add table
Reference in a new issue