mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Remove entity description mixin in Venstar (#112964)
This commit is contained in:
parent
90769b460d
commit
39bfb2b5ba
@ -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,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user