bramkragten / weather-card

Weather Card with animated icons for Home Assistant Lovelace
MIT License
499 stars 174 forks source link

Integrate to Personal Ambient Weather Station #120

Open Thesourceminer opened 3 years ago

Thesourceminer commented 3 years ago

I would love to have my own weather station showing stats on this card is there any way to add the sensors in HA to each component (IE: wind speed, temp, precipitation, humidity etc)

austinbeam commented 2 years ago

@Thesourceminer This can be done fairly easily with a template weather provider. Then just use your template weather provider as the entity for this card as opposed to using the built-in provider. This is what I've done and it has worked quite well for me. Good luck!

Note: I found that the ecobee weather provider was a better base for me than the built-in provider, but this is personal preference.

weather:
  - platform: template
    name: "Custom Weather"
    condition_template: "{{ states('weather.ecobee') }}"
    temperature_template: "{{ states('sensor.ambient_temp') | float}}"
    humidity_template: "{{ states('sensor.ambient_humidity') | float}}"
    pressure_template: "{{ states('sensor.ambient_abs_pressure') | float}}"
    forecast_template: "{{ state_attr('weather.ecobee', 'forecast') }}"
    wind_speed_template: "{{ states('sensor.ambient_wind_speed') | float}}"
    wind_bearing_template: "{{ states('sensor.ambient_wind_dir') | float}}"
    visibility_template: "{{ state_attr('weather.ecobee', 'visibility') }}"