Backup plans for when a weather forecast provider becomes unavailable
This commit is contained in:
@ -5,7 +5,16 @@ weather:
|
||||
temperature_template: "{{ states('sensor.pirateweather_temperature') | float }}"
|
||||
temperature_unit: °F
|
||||
humidity_template: "{{ states('sensor.pirateweather_humidity') | float }}"
|
||||
forecast_template: "{{ state_attr('weather.openweathermap', 'forecast') }}"
|
||||
forecast_template: >
|
||||
{% if state_attr('weather.iron_nerd_studios','forecast') %}
|
||||
{{ state_attr('weather.iron_nerd_studios','forecast') }}
|
||||
{% elif state_attr('weather.kdfi_daynight','forecast') %}
|
||||
{{ state_attr('weather.kdfi_daynight','forecast') }}
|
||||
{% elif state_attr('weather.openweathermap','forecast') %}
|
||||
{{ state_attr('weather.openweathermap','forecast') }}
|
||||
{% else %}
|
||||
{{ state_attr('weather.weatherapi_stratton_ave','forecast') }}
|
||||
{% endif %}
|
||||
pressure_template: "{{ states('sensor.kdfi_barometric_pressure') | float }}"
|
||||
pressure_unit: inHg
|
||||
wind_speed_template: "{{ states('sensor.pirateweather_wind_speed') | float }}"
|
||||
@ -23,7 +32,12 @@ weather:
|
||||
temperature_template: "{{ states('sensor.pirateweather_temperature') | float }}"
|
||||
temperature_unit: °F
|
||||
humidity_template: "{{ states('sensor.pirateweather_humidity') | float }}"
|
||||
forecast_template: "{{ state_attr('weather.kdfi_hourly', 'forecast') }}"
|
||||
forecast_template: >
|
||||
{% if state_attr('weather.kdfi_hourly','forecast') %}
|
||||
{{ state_attr('weather.kdfi_hourly', 'forecast') }}
|
||||
{% else %}
|
||||
{{ state_attr('weather.iron_nerd_studios_hourly','forecast') }}
|
||||
{% endif %}
|
||||
pressure_template: "{{ states('sensor.kdfi_barometric_pressure') | float }}"
|
||||
pressure_unit: inHg
|
||||
wind_speed_template: "{{ states('sensor.pirateweather_wind_speed') | float }}"
|
||||
|
Reference in New Issue
Block a user