Core: Unhandled exception in AirVisual

Created on 30 Jun 2019  Â·  5Comments  Â·  Source: home-assistant/core

Home Assistant release with the issue:

0.95.4

Last working Home Assistant release (if known):

Uncertain – perhaps 0.94.x?

Operating environment (Hass.io/Docker/Windows/etc.):

Docker behind NGINX proxy

Component/platform:

airvisual

Description of problem:

Recently, the "Main Pollutant" sensor has disappeared with the below stacktrace.

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

sensor:
  - platform: airvisual
    api_key: !secret airvisual_api_key
    monitored_conditions:
      - us
    show_on_map: false

Traceback (if applicable):

Traceback (most recent call last):
  File "/usr/src/app/homeassistant/helpers/entity_platform.py", line 261, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/app/homeassistant/helpers/entity.py", line 375, in async_device_update
    await self.async_update()
  File "/usr/src/app/homeassistant/components/airvisual/sensor.py", line 244, in async_update
    symbol = data['main{0}'.format(self._locale)]
KeyError: 'mainus'

Additional information:

airvisual problem in dependency

Most helpful comment

This looks like an issue with the AirVisual API: it no longer returns main pollutant information. None of the documentation reflects this, so I'm assuming it's a bug. I've reached out to AirVisual support.

All 5 comments

This looks like an issue with the AirVisual API: it no longer returns main pollutant information. None of the documentation reflects this, so I'm assuming it's a bug. I've reached out to AirVisual support.

This looks like an issue with the AirVisual API: it no longer returns main pollutant information. None of the documentation reflects this, so I'm assuming it's a bug. I've reached out to AirVisual support.

@bachya Sorry for this inconvenience. Ardit from AirVisual team here. Actually, the bug was that it was returning the "Main Pollutant" using a free API key (Community Plan) and that bug was fixed so that's why it was not returning "Main Pollutant" anymore. We made an exception for our old users to have access to "Main Pollutant" using Community Plan. Just a heads up that this will not be available for the new users that register for with Community Plan. If you wanna have access to "Main Pollutant" you need to upgrade to Startup plan.

Really nice work on your end and thank you for using our service.

I just received this message from my support ticket:

The main pollutant value has been restored for all Community plan API keys, old and new.

@arditdine Can you confirm?

Yes, that's right. PM decided to make Main Pollutant available for all plans

It is back and working for me, thank you!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

coolriku picture coolriku  Â·  3Comments

aweb-01 picture aweb-01  Â·  3Comments

arangates picture arangates  Â·  3Comments

ofuangka picture ofuangka  Â·  3Comments

TheZoker picture TheZoker  Â·  3Comments