AirVisual Lovelace Card (for Air Quality Index)

Same problem here too. Cannot get the card. And I know it doesn’t matter, but tried using both u_s and us.

Did you move the resources from ui-lovelace.yaml to configuration.yaml as described here https://www.home-assistant.io/blog/2020/03/18/release-107/ and https://www.home-assistant.io/lovelace/dashboards-and-views/ ?

1 Like

Working for me on .107.7. I am on the latest version and did the migration from ui-lovelace.yaml to configuration.yaml as described above.

I got mine to work but I could not figure out how you got the half white and the other half green? Also how did you round the edges?


air_pollution_level: sensor.u_s_air_pollution_level
air_quality_index: sensor.u_s_air_quality_index
city: ‘Lexington, VA’
country: US
main_pollutant: sensor.u_s_main_pollutant
temp: weather.openweathermap
type: ‘custom:air-visual-card’

Untitled

Do you want rounded corners for just this card or all of your cards?

All my other cards are rounded on the edge due to the way Lovelace is setup but this card does not conform to the template.

you will need to use card-mod to achieve this then.

I have the card-mod installed I will give that a try thanks.

I’m building my weather page look n feel today will post up if you’re still stuck.

1 Like

The top white section was part of the original card and the rounded corners was part of my theme. I don’t use this card anymore and have changed themes.

Oh ok did you create a newer card or just not use it at all? Can you share you card config? Yeah I have the rounded theme too but the card did not conform to it. JimPower said to use card-mod to get that so tinkering with it now.

Love to see it when you are done.

1 Like

I just stopped using it totally. My setup is a bit of a mess at the moment. I haven’t fixed it up with any breaking changes for a few months, so there are a few red boxes on my view at the moment. I have a few projects that I was working on, but that all got put on hold with the virus happening at the moment. Hopefully I can get back into HA some more soon.

1 Like

Ah got that been there done that too just recently. I rebuilt it all and now working better than ever with the new versions.

Haha me too, my UI hasn’t been touched in 12 months. I have now completed a full install from scratch. Now a full UI redesign, it will take me awhile to finish design for weather page but I can do up a airvisual round card up soon.

OK here you go test layout

#################################################################
#                                                               #
#                         AirVisual Card                        #
#                                                               #
#################################################################

    - type: custom:air-visual-card
      air_pollution_level: sensor.chinese_air_pollution_level
      air_quality_index: sensor.chinese_air_quality_index
      main_pollutant: sensor.chinese_main_pollutant
      temp: "{{ (data | fromjson)['temp'] }}"
      city: 'Burleigh Waters'
      style: |
        ha-card  {
          border-radius: 5px;
        }      
1 Like

seeing this flickering face lately, any one else experiencing this too:

May-13-2020 09-35-30

not really sure what caused it tbh, updating HA or the Airvisual card…
@dnguyen800 is this something you can explain?

thanks for having a look.

No idea what’s happening here. Issue doesn’t happen on my instance of HA 0.109.6. Are you loading the icons locally on your HA instance? If not, I think there is a setting that allows you to point to a local directory to load the icons. You would have to download the icons from the Github repository.

I’ve been busy installing a new HA instance so now I can properly test the card again. Unfortunately my programming and HA theme knowledge is limited, so I’m relying on others to submit PRs to fix issues.

yes all icons locally.
appreciate if you can have a look later on. thanks!

stoped working
us and chinese sensor unavaible

1 Like

Air Visual integration works shortly after adding, but then at next update all sensors shows unavailable. If I remove AirVisual integration and add it again it will show data but again until next update of sensors. Not sure how long does it take, what is default pooling interval, but it is useless at this stage.