Fix incorrect values for AirVisual Pro sensors (#84725)

This commit is contained in:
Aaron Bach 2022-12-28 14:06:44 -07:00 committed by GitHub
parent 03ca50f292
commit 580f2058a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -159,6 +159,6 @@ class AirVisualProSensor(AirVisualProEntity, SensorEntity):
elif self.entity_description.key == SENSOR_KIND_BATTERY_LEVEL:
self._attr_native_value = self.status["battery"]
else:
self._attr_native_value = self.MEASUREMENTS_KEY_TO_VALUE[
self.entity_description.key
self._attr_native_value = self.measurements[
self.MEASUREMENTS_KEY_TO_VALUE[self.entity_description.key]
]