Air Visual API Limit being hit daily since 0.110.0

Since updating to 0.110.0 I seem to be hitting the Air Visual limit around 8pm every day - this never happened before the update to 0.110.0. There have been several issues related to this on GitHub here which should have been fixed in 0.110.2 here. Since the 0.110.2 update I hit the limit before midday UK time with 1 restart of HA before this happened.

This is the error seen in the logs - “Error fetching geography data data: Error while retrieving data: call_per_day_limit_reached”

I have a seen this on another persons HA around lunch time today so its not just related to my account…

Is anyone else hitting the API limit since 0.110.0 ?

2 Likes

yep, me too…

2020-05-25 23:36:46 ERROR (MainThread) [homeassistant.components.airvisual] Error fetching geography data data: Error while retrieving data: call_per_day_limit_reached

causing this:

2020-05-25 23:39:08 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up airvisual platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 186, in _async_setup_platform
    await asyncio.gather(*pending)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 295, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 444, in _async_add_entity
    await entity.async_added_to_hass()
  File "/usr/src/homeassistant/homeassistant/components/airvisual/__init__.py", line 371, in async_added_to_hass
    self.update_from_latest_data()
  File "/usr/src/homeassistant/homeassistant/components/airvisual/sensor.py", line 166, in update_from_latest_data
    data = self.coordinator.data["current"]["pollution"]
TypeError: 'NoneType' object is not subscriptable

this:

2020-05-25 23:39:13 ERROR (MainThread) [homeassistant.components.sensor] airvisual: Error on device update!
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 322, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 470, in async_device_update
    await self.async_update()
  File "/usr/src/homeassistant/homeassistant/components/airvisual/__init__.py", line 378, in async_update
    await self.coordinator.async_request_refresh()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 118, in async_request_refresh
    await self._debounced_refresh.async_call()
  File "/usr/src/homeassistant/homeassistant/helpers/debounce.py", line 60, in async_call
    await self.hass.async_add_job(self.function)  # type: ignore
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 177, in async_refresh
    update_callback()
  File "/usr/src/homeassistant/homeassistant/components/airvisual/__init__.py", line 366, in update
    self.update_from_latest_data()
  File "/usr/src/homeassistant/homeassistant/components/airvisual/sensor.py", line 166, in update_from_latest_data
    data = self.coordinator.data["current"]["pollution"]
TypeError: 'NoneType' object is not subscriptable

and:

2020-05-25 23:44:14 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 111, in _handle_refresh_interval
    await self.async_refresh()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 177, in async_refresh
    update_callback()
  File "/usr/src/homeassistant/homeassistant/components/airvisual/__init__.py", line 366, in update
    self.update_from_latest_data()
  File "/usr/src/homeassistant/homeassistant/components/airvisual/sensor.py", line 166, in update_from_latest_data
    data = self.coordinator.data["current"]["pollution"]
TypeError: 'NoneType' object is not subscriptable
1 Like

Same here. After reinstalling integration and changing API key, I managed to get it working for few hours and then I got call per day limit reached.

It’s been fine for me since 0.110.3. Wait until after midnight and check again tomorrow.

1 Like

Yesterday I updated to 110.4 and today it works fine!

Updated to 2021.12.10 and I seem to be having this issue again. Anyone else?

Yes, I had it for the past 2 days - ran into the daily call limit on both days. Only way I could clear it was to delete the current API off their portal and create a new one. Took a couple of attempts to get it to work when using the built in integration but it worked in the end. Seems to be fine today.

see: Airvisual reports call_per_day_limit_reached · Issue #64563 · home-assistant/core · GitHub