From 1dcfe8e4b3f92c966f474beb464c67811523ebdf Mon Sep 17 00:00:00 2001 From: Gerhard Kalab Date: Fri, 26 Jan 2024 19:35:36 +0100 Subject: [PATCH] Fix invalid json when forecast hours is set to zero --- blueprints/automation/awtrix_weatherflow.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/blueprints/automation/awtrix_weatherflow.yaml b/blueprints/automation/awtrix_weatherflow.yaml index 0858c6c..395201f 100644 --- a/blueprints/automation/awtrix_weatherflow.yaml +++ b/blueprints/automation/awtrix_weatherflow.yaml @@ -939,10 +939,10 @@ action: { "draw": [ {%- if hours_to_show > 0 %} - {{draw_forecast_lines(8,hours_to_show,0)}} + {{draw_forecast_lines(8,hours_to_show,0)}}, {%- endif %} {%- if current_temp != 'unavailable' -%} - ,{"dt":[{{text_x}},1,"{{temp_text}}","{{interpolate(color_dict, current_temp | float)}}"]} + {"dt":[{{text_x}},1,"{{temp_text}}","{{interpolate(color_dict, current_temp | float)}}"]} {%- else -%} {"dt":"err"} {%- endif -%}