Remove entity description mixin in Venstar (#112964)

This commit is contained in:
Joost Lekkerkerker 2024-03-11 11:53:40 +01:00 committed by GitHub
parent 90769b460d
commit 39bfb2b5ba
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -66,20 +66,15 @@ SCHEDULE_PARTS: dict[int, str] = {
} }
@dataclass(frozen=True) @dataclass(frozen=True, kw_only=True)
class VenstarSensorTypeMixin: class VenstarSensorEntityDescription(SensorEntityDescription):
"""Mixin for sensor required keys.""" """Base description of a Sensor entity."""
value_fn: Callable[[VenstarDataUpdateCoordinator, str], Any] value_fn: Callable[[VenstarDataUpdateCoordinator, str], Any]
name_fn: Callable[[str], str] name_fn: Callable[[str], str]
uom_fn: Callable[[Any], str | None] uom_fn: Callable[[Any], str | None]
@dataclass(frozen=True)
class VenstarSensorEntityDescription(SensorEntityDescription, VenstarSensorTypeMixin):
"""Base description of a Sensor entity."""
async def async_setup_entry( async def async_setup_entry(
hass: HomeAssistant, hass: HomeAssistant,
config_entry: ConfigEntry, config_entry: ConfigEntry,