Remove unnecessary AirVisual Pro entity description mixins (#108192)
This commit is contained in:
parent
70aff728fd
commit
e553cf2241
1 changed files with 3 additions and 10 deletions
|
@ -26,22 +26,15 @@ from . import AirVisualProData, AirVisualProEntity
|
|||
from .const import DOMAIN
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class AirVisualProMeasurementKeyMixin:
|
||||
"""Define an entity description mixin to include a measurement key."""
|
||||
@dataclass(frozen=True, kw_only=True)
|
||||
class AirVisualProMeasurementDescription(SensorEntityDescription):
|
||||
"""Describe an AirVisual Pro sensor."""
|
||||
|
||||
value_fn: Callable[
|
||||
[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 = (
|
||||
AirVisualProMeasurementDescription(
|
||||
key="air_quality_index",
|
||||
|
|
Loading…
Add table
Reference in a new issue