`air_quality` and `filter_life` fixes for Pur131S (#74740)

pull/74838/head
Ethan Madden 2022-07-09 10:51:47 -07:00 committed by GitHub
parent 8ce897f462
commit 5defe67269
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -83,13 +83,12 @@ SENSORS: tuple[VeSyncSensorEntityDescription, ...] = (
native_unit_of_measurement=PERCENTAGE,
state_class=SensorStateClass.MEASUREMENT,
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),
),
VeSyncSensorEntityDescription(
key="air-quality",
name="Air Quality",
state_class=SensorStateClass.MEASUREMENT,
value_fn=lambda device: device.details["air_quality"],
exists_fn=lambda device: sku_supported(device, AIR_QUALITY_SUPPORTED),
),