dnguyen800 / air-visual-card

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

Installation issues? #11

Closed J-Hurtta closed 4 years ago

J-Hurtta commented 4 years ago

I have installed the custom card via HACS and I'm configuring it via Configure UI --> Raw config editor.

I have added the following to my config:

Resources:
  - url: /community_plugin/air-visual-card/air-visual-card.js
    type: js

However, the AirVisual sensor seems to be providing different entities than the installation instructions assume:

sensor.u_s_air_pollution_level_2
sensor.u_s_air_quality_index_2
sensor.u_s_main_pollutant_2

After adapting the card code to the above sensors (that seem to be working correctly):

      - type: custom:air-visual-card
        air_pollution_level: sensor.u_s_air_pollution_level_2
        air_quality_index: sensor.u_s_air_quality_index_2
        main_pollutant: sensor.u_s_main_pollutant_2
        temp: weather.dark_sky
        city: 'Espoo'

and restarting my Home Assistant, the card displays the following error:

image

However, my Chrome console nor Home Assistant logs show any errors. Here is my lovelace configuration. Any ideas what might be wrong?

J-Hurtta commented 4 years ago

The issue was fixed by using "resources" instead of "Resources" in the configuration.