From a8599b6c0c086aad847a13eaadf4d5700be6bd69 Mon Sep 17 00:00:00 2001 From: Giorgio Ravera Date: Tue, 19 Feb 2019 16:59:22 +0100 Subject: [PATCH] minor fix --- automation/themes.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/automation/themes.yaml b/automation/themes.yaml index e5e516da..96677b0b 100644 --- a/automation/themes.yaml +++ b/automation/themes.yaml @@ -17,8 +17,8 @@ - service: frontend.set_theme data_template: name: >- - {% if now().strftime('%H')|int >= 8 and now().strftime('%H')|int < 23 %} - default - {% else %} + {% if trigger.to_state.state == 'on' %} midnight + {% else %} + default {% endif %} -- 2.47.3