From 3e2751186fa0c8f6af2a698d45baed20483a55d0 Mon Sep 17 00:00:00 2001 From: Giorgio Ravera Date: Thu, 6 Feb 2020 21:26:31 +0100 Subject: [PATCH] Added themes for vacation. --- automation/themes.yaml | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/automation/themes.yaml b/automation/themes.yaml index 4ea9c42e..e73b97d3 100644 --- a/automation/themes.yaml +++ b/automation/themes.yaml @@ -7,18 +7,25 @@ trigger: - platform: state - entity_id: input_boolean.home_mode_night + entity_id: input_boolean.home_mode_day to: 'on' - platform: state entity_id: input_boolean.home_mode_night - to: 'off' - + to: 'on' + - platform: state + entity_id: input_boolean.home_mode_away + to: 'on' + action: - service: frontend.set_theme data_template: name: >- - {% if trigger.to_state.state == 'on' %} - midnight_blue - {% else %} + {% if trigger.entity_id == 'input_boolean.home_mode_day' %} default - {% endif %} + {% endif %} + {% if trigger.entity_id == 'input_boolean.home_mode_night' %} + midnight_blue + {% endif %} + {% if trigger.entity_id == 'input_boolean.home_mode_away' %} + reeder_dark + {% endif %} -- 2.47.3