mirror of
https://github.com/home-assistant/core.git
synced 2025-04-28 11:17:53 +00:00
Remove unnecessary AirVisual Pro entity description mixins (#108192)
This commit is contained in:
parent
70aff728fd
commit
e553cf2241
@ -26,22 +26,15 @@ from . import AirVisualProData, AirVisualProEntity
|
|||||||
from .const import DOMAIN
|
from .const import DOMAIN
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
@dataclass(frozen=True, kw_only=True)
|
||||||
class AirVisualProMeasurementKeyMixin:
|
class AirVisualProMeasurementDescription(SensorEntityDescription):
|
||||||
"""Define an entity description mixin to include a measurement key."""
|
"""Describe an AirVisual Pro sensor."""
|
||||||
|
|
||||||
value_fn: Callable[
|
value_fn: Callable[
|
||||||
[dict[str, Any], dict[str, Any], dict[str, Any], dict[str, Any]], float | int
|
[dict[str, Any], dict[str, Any], dict[str, Any], dict[str, Any]], float | int
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
|
||||||
class AirVisualProMeasurementDescription(
|
|
||||||
SensorEntityDescription, AirVisualProMeasurementKeyMixin
|
|
||||||
):
|
|
||||||
"""Describe an AirVisual Pro sensor."""
|
|
||||||
|
|
||||||
|
|
||||||
SENSOR_DESCRIPTIONS = (
|
SENSOR_DESCRIPTIONS = (
|
||||||
AirVisualProMeasurementDescription(
|
AirVisualProMeasurementDescription(
|
||||||
key="air_quality_index",
|
key="air_quality_index",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user