Remove entity description mixin in Venstar (#112964)
parent
90769b460d
commit
39bfb2b5ba
|
@ -66,20 +66,15 @@ SCHEDULE_PARTS: dict[int, str] = {
|
|||
}
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class VenstarSensorTypeMixin:
|
||||
"""Mixin for sensor required keys."""
|
||||
@dataclass(frozen=True, kw_only=True)
|
||||
class VenstarSensorEntityDescription(SensorEntityDescription):
|
||||
"""Base description of a Sensor entity."""
|
||||
|
||||
value_fn: Callable[[VenstarDataUpdateCoordinator, str], Any]
|
||||
name_fn: Callable[[str], str]
|
||||
uom_fn: Callable[[Any], str | None]
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class VenstarSensorEntityDescription(SensorEntityDescription, VenstarSensorTypeMixin):
|
||||
"""Base description of a Sensor entity."""
|
||||
|
||||
|
||||
async def async_setup_entry(
|
||||
hass: HomeAssistant,
|
||||
config_entry: ConfigEntry,
|
||||
|
|
Loading…
Reference in New Issue