Remove entity description mixin in AirQ (#112377)
This commit is contained in:
parent
e076b6aacf
commit
900112b1e8
1 changed files with 3 additions and 8 deletions
|
@ -37,18 +37,13 @@ from .const import (
|
|||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class AirQEntityDescriptionMixin:
|
||||
"""Class for keys required by AirQ entity."""
|
||||
@dataclass(frozen=True, kw_only=True)
|
||||
class AirQEntityDescription(SensorEntityDescription):
|
||||
"""Describes AirQ sensor entity."""
|
||||
|
||||
value: Callable[[dict], float | int | None]
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class AirQEntityDescription(SensorEntityDescription, AirQEntityDescriptionMixin):
|
||||
"""Describes AirQ sensor entity."""
|
||||
|
||||
|
||||
# Keys must match those in the data dictionary
|
||||
SENSOR_TYPES: list[AirQEntityDescription] = [
|
||||
AirQEntityDescription(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue