mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 17:27:10 +00:00
Remove unnecessary PurpleAir entity description mixins (#108196)
This commit is contained in:
parent
cc9b874be3
commit
0a9ec1a351
@ -33,20 +33,13 @@ from .coordinator import PurpleAirDataUpdateCoordinator
|
||||
CONCENTRATION_PARTICLES_PER_100_MILLILITERS = f"particles/100{UnitOfVolume.MILLILITERS}"
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class PurpleAirSensorEntityDescriptionMixin:
|
||||
"""Define a description mixin for PurpleAir sensor entities."""
|
||||
@dataclass(frozen=True, kw_only=True)
|
||||
class PurpleAirSensorEntityDescription(SensorEntityDescription):
|
||||
"""Define an object to describe PurpleAir sensor entities."""
|
||||
|
||||
value_fn: Callable[[SensorModel], float | str | None]
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class PurpleAirSensorEntityDescription(
|
||||
SensorEntityDescription, PurpleAirSensorEntityDescriptionMixin
|
||||
):
|
||||
"""Define an object to describe PurpleAir sensor entities."""
|
||||
|
||||
|
||||
SENSOR_DESCRIPTIONS = [
|
||||
PurpleAirSensorEntityDescription(
|
||||
key="humidity",
|
||||
|
Loading…
x
Reference in New Issue
Block a user