Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Card does not show 2 of 3 sensors #61

Open
dankarization opened this issue May 22, 2024 · 5 comments · Fixed by #62
Open

Card does not show 2 of 3 sensors #61

dankarization opened this issue May 22, 2024 · 5 comments · Fixed by #62

Comments

@dankarization
Copy link

This is my config

      - type: custom:air-visual-card
        air_pollution_level: sensor.u_s_air_pollution_level
        air_quality_index: sensor.u_s_air_quality_index
        main_pollutant: sensor.u_s_main_pollutant
        weather: weather.my_weather
        hide_weather: true
        hide_title: true
        unit_of_measurement: AQI
        hide_face: false

And this is how card looks
image
When I click on 2 empty spaces, 2 working sensors opens accordingly
image
image

What am I doing wrong here? HA version 2024.4.3

@dnguyen800
Copy link
Owner

I'll keep this issue open until it is tested furthered. The issue is still present for me but maybe it is fixed for others.

@0xa51f
Copy link
Contributor

0xa51f commented Jun 1, 2024

Try using

air_pollution_level: sensor.u_s_air_quality_index

@dankarization
Copy link
Author

With no changes to the config now the card shows main pollutant but not it's level
image
With changes @asifkassam suggested now everything looks good, thanks!
image

But it's counter intuitive for me that I need to input index instead of level there to see level hehe. Calculations are done by the card itself now?

@anthonws
Copy link

anthonws commented Jun 4, 2024

This is not working for me for a while and the latest fix did not help.
Not sure if its the station I'm using, but it seems that the data is there.

image image
cards:
  - type: custom:air-visual-card
    hide_weather: true
    hide_title: true
    hide_face: false
    air_pollution_level: sensor.waqi_olivais_lisboa_portugal
    air_quality_index: sensor.waqi_olivais_lisboa_portugal
    main_pollutant: sensor.olivais_lisboa_portugal_dominant_pollutant
    unit_of_measurement: AQI
image

@0xa51f
Copy link
Contributor

0xa51f commented Jun 8, 2024

Looks like the WAQI integration has changed how it reports from a single sensor with attributes to individual sensors (since HA 2024.6.0?)

Dominant pollutant now has its own sensor indicating which pollutant is dominant, there are also individual sensors for each pollutant reported by the station (which vary wildly from my brief look at 3 different stations in different countries)

@dnguyen800 - this card may need a re-think for WAQI

@dankarization - Yes the card works it out correctly from an AQI sensor input - also Airvisual (cloud) gives you the main pollutant but not the level of that pollutant (not sure if this has changed)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants