From fdaf752a7bb9adf1ab6e7d64f78dcf42bed39eae Mon Sep 17 00:00:00 2001 From: Madelena Mak Date: Sun, 10 Jul 2022 08:33:20 -0700 Subject: [PATCH] Fix bracket bug --- sensor.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sensor.yaml b/sensor.yaml index efc122e..6597406 100644 --- a/sensor.yaml +++ b/sensor.yaml @@ -107,7 +107,7 @@ template: {% set cond3 = state_attr('weather.hourly', 'forecast')[3].condition %} {% set next_setting = as_timestamp(state_attr('sun.sun', 'next_setting')) %} {% set next_rising = as_timestamp(state_attr('sun.sun', 'next_rising')) %} - {% set cond3_time = as_timestamp(state_attr('weather.hourly', 'forecast')[3]].datetime) %} + {% set cond3_time = as_timestamp(state_attr('weather.hourly', 'forecast')[3].datetime) %} {% if cond3_time > next_setting and cond3_time < next_rising %} {% if cond3 == 'sunny' %} night {% elif cond3 == 'partlycloudy' %} night-partly-cloudy {% else %} {{ cond3 }} {% endif %} {% else %}