mirror of
https://github.com/home-assistant/core.git
synced 2025-07-10 06:47:09 +00:00
air_quality
and filter_life
fixes for Pur131S (#74740)
This commit is contained in:
parent
8ce897f462
commit
5defe67269
@ -83,13 +83,12 @@ SENSORS: tuple[VeSyncSensorEntityDescription, ...] = (
|
|||||||
native_unit_of_measurement=PERCENTAGE,
|
native_unit_of_measurement=PERCENTAGE,
|
||||||
state_class=SensorStateClass.MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
entity_category=EntityCategory.DIAGNOSTIC,
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
value_fn=lambda device: device.details["filter_life"],
|
value_fn=lambda device: device.filter_life,
|
||||||
exists_fn=lambda device: sku_supported(device, FILTER_LIFE_SUPPORTED),
|
exists_fn=lambda device: sku_supported(device, FILTER_LIFE_SUPPORTED),
|
||||||
),
|
),
|
||||||
VeSyncSensorEntityDescription(
|
VeSyncSensorEntityDescription(
|
||||||
key="air-quality",
|
key="air-quality",
|
||||||
name="Air Quality",
|
name="Air Quality",
|
||||||
state_class=SensorStateClass.MEASUREMENT,
|
|
||||||
value_fn=lambda device: device.details["air_quality"],
|
value_fn=lambda device: device.details["air_quality"],
|
||||||
exists_fn=lambda device: sku_supported(device, AIR_QUALITY_SUPPORTED),
|
exists_fn=lambda device: sku_supported(device, AIR_QUALITY_SUPPORTED),
|
||||||
),
|
),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user