Remove entity description mixin in Tradfri (#112953)
This commit is contained in:
parent
7ea1f42b84
commit
83dc99cd9e
1 changed files with 3 additions and 11 deletions
|
@ -38,21 +38,13 @@ from .const import (
|
|||
from .coordinator import TradfriDeviceDataUpdateCoordinator
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class TradfriSensorEntityDescriptionMixin:
|
||||
"""Mixin for required keys."""
|
||||
@dataclass(frozen=True, kw_only=True)
|
||||
class TradfriSensorEntityDescription(SensorEntityDescription):
|
||||
"""Class describing Tradfri sensor entities."""
|
||||
|
||||
value: Callable[[Device], Any | None]
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class TradfriSensorEntityDescription(
|
||||
SensorEntityDescription,
|
||||
TradfriSensorEntityDescriptionMixin,
|
||||
):
|
||||
"""Class describing Tradfri sensor entities."""
|
||||
|
||||
|
||||
def _get_air_quality(device: Device) -> int | None:
|
||||
"""Fetch the air quality value."""
|
||||
assert device.air_purifier_control is not None
|
||||
|
|
Loading…
Add table
Reference in a new issue