mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 09:17: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}"
|
CONCENTRATION_PARTICLES_PER_100_MILLILITERS = f"particles/100{UnitOfVolume.MILLILITERS}"
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
@dataclass(frozen=True, kw_only=True)
|
||||||
class PurpleAirSensorEntityDescriptionMixin:
|
class PurpleAirSensorEntityDescription(SensorEntityDescription):
|
||||||
"""Define a description mixin for PurpleAir sensor entities."""
|
"""Define an object to describe PurpleAir sensor entities."""
|
||||||
|
|
||||||
value_fn: Callable[[SensorModel], float | str | None]
|
value_fn: Callable[[SensorModel], float | str | None]
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
|
||||||
class PurpleAirSensorEntityDescription(
|
|
||||||
SensorEntityDescription, PurpleAirSensorEntityDescriptionMixin
|
|
||||||
):
|
|
||||||
"""Define an object to describe PurpleAir sensor entities."""
|
|
||||||
|
|
||||||
|
|
||||||
SENSOR_DESCRIPTIONS = [
|
SENSOR_DESCRIPTIONS = [
|
||||||
PurpleAirSensorEntityDescription(
|
PurpleAirSensorEntityDescription(
|
||||||
key="humidity",
|
key="humidity",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user