Closed scstraus closed 3 years ago
Interesting – the JSON file on your unit is missing the sensor_life
key. I wonder (a) if that will happen sporadically going forward and (b) what other fields may come and go without warning...
I'll put a guard in place around sensor_life
and see how that treats us.
Thank you.
Just installed .117.1, but still having a similar error. Has the fix made it in yet (I wish I could figure out how to tell when a PR actually gets published into a release).
Here's the traceback:
2020-11-01 00:29:28 ERROR (MainThread) [homeassistant.components.sensor] airvisual: Error on device updat
e!
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 357, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 466, in async_device_update
await task
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 235, in async_update
await self.coordinator.async_request_refresh()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 126, in async_request_r
efresh
await self._debounced_refresh.async_call()
File "/usr/src/homeassistant/homeassistant/helpers/debounce.py", line 73, in async_call
await self.hass.async_add_hass_job(self._job) # type: ignore
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 193, in async_refresh
update_callback()
File "/usr/src/homeassistant/homeassistant/components/airvisual/__init__.py", line 414, in update
self.update_from_latest_data()
File "/usr/src/homeassistant/homeassistant/components/airvisual/air_quality.py", line 105, in update_from_latest_data
for pollutant, lifespan in self.coordinator.data["status"][
KeyError: 'sensor_life'
@scstraus I made a good fix here, but totally neglected to make the proper adjustment in HASS. 🤦 I'll fix that now.
@scstraus Alright, this will get into 0.117.3: https://github.com/home-assistant/core/pull/42760
Describe the bug Can create the integration, but it will not spawn any entities
To Reproduce Add air visual node pro integration, and look for entities.
Expected behavior Creating entities.
Additional context Here's a traceback: