From ce188b059e4cb2519b3840ed5e8e5276ecbc0693 Mon Sep 17 00:00:00 2001 From: Tony Stork Date: Thu, 5 Oct 2023 16:17:04 -0400 Subject: [PATCH] Fix missing precip forecast with some weather providers #89 --- packages/custom_weather.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/custom_weather.yaml b/packages/custom_weather.yaml index fdecab5..1f88b4d 100644 --- a/packages/custom_weather.yaml +++ b/packages/custom_weather.yaml @@ -395,7 +395,11 @@ template: {% set forecast = state_attr('weather.iron_nerd_weather_station','forecast')[0] %} {{ forecast.wind_speed }} precipitation: >- - {% set forecast = state_attr('weather.iron_nerd_weather_station','forecast')[0] %} + {% if state_attr('weather.iron_nerd_weather_station','precipitation') %} + {% set forecast = state_attr('weather.iron_nerd_weather_station','forecast')[0] %} + {% else %} + {% set forecast = state_attr('weather.iron_nerd_studios','forecast')[0] %} + {% endif %} {{ forecast.precipitation }} friendly: >- {% set forecast = state_attr('weather.iron_nerd_weather_station','forecast')[0] %}