dnguyen800 / air-visual-card

A Lovelace card showing air quality data from airvisual.com. Requires the AirVisual component.
MIT License
103 stars 35 forks source link

Add official support for Tomorrow.io #60

Open raetha opened 1 year ago

raetha commented 1 year ago

The Home Assistant Tomorrow.io integration provides air quality sensors along with weather sensors. In particular it includes these three which map nicely to the ones this card needs: US EPA Health Concern = Air Pollution Level US EPA Air Quality Index = Air Quality Index US EPA Primary Pollutant = Main Pollutant

This nearly works perfectly by just substituting in the entities, however the Main Pollutant is not working correctly, at least in my current values. It currently has a value of "pm25" but the card is displaying "main pollutant | pollutant unit" as the value. I'm not the best with programming, though believe that the card may be looking for attributes in the sensor which Tomorrow.io does not provide. That particular sensor has no attributes and only lists the main pollutant itself.

It would be ideal if this card could show even a truncated version of information that just included the pollutant type but without a unit value.

Thanks for consideration!

WebfinityDesign commented 5 months ago

I do have the same problem. It only shows main pollutant | pollutant unit I am using AEMET as a weather service, so I'm not sure it's a specific tomorrow.io problem. It is also not showing the weather when using AEMET, when I use Openweather as a weather service it does show the weather (no pollution though)