dnguyen800 / air-visual-card

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

Add weather status and fix CSS text color entries #21

Closed jeremywillans closed 4 years ago

jeremywillans commented 4 years ago

Hi @dnguyen800,

This PR proposes fixing the CSS entries for text color and adding a new attribute to allow a custom weather status to be referenced.

For your consideration 👍

Mariusthvdb commented 4 years ago

understanding this has been merged and closed, could we please have some description of the change in the frontend for this? Ive added the changes and see exactly no change at all.

using this 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
temp: weather.woensdrecht
country: 'NL'
city: 'Woensdrecht'
icons: '/local/weather/aqi_icons/'
icon_sensor: sensor.weather_icon
hide_title: false
web_address: https://www.airvisual.com/netherlands/north-brabant/huijbergen/huijbergen-vennekenstraat

thanks!

(ps web_address is not supported yet, hope this will be available anytime in the future, have tried my own edits on the city field but nit successful yet..)

jeremywillans commented 4 years ago

Good point @Mariusthvdb, PR #24 raised to add the new option to README

I assume your "icon_sensor" is also custom? which appears to be the same as what was merged.

The CSS changes just align the field to the appropriate name, which pulls the color from HA variable.