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

AQI 50 is displayed as Moderate, Should be Good ?? #3

Closed MarsWarrior closed 4 years ago

MarsWarrior commented 5 years ago

On the AirVisual site, 50 is displayed as "Good": image

The card in Hass shows "Moderate", although I sometimes see "Good" with a yellow background: image

dnguyen800 commented 4 years ago

Good catch! The error is in my code here:

          case (aqiSensor.value < 50):

It should be:

          case (aqiSensor.value <= 50):

I will be making updates to the card later this week, but if you would like to make the change now, you can edit the .js file directly with this change.

dnguyen800 commented 4 years ago

fixed in latest release, thanks.