From 73ef5e6363281930d82655888e9c92bfb55b35c9 Mon Sep 17 00:00:00 2001 From: Przemek Grondek Date: Mon, 16 Dec 2024 01:55:33 +0100 Subject: [PATCH] Add season switch for modes --- roles/scripts/tasks/templates.yml | 1 + roles/scripts/templates/modes.yaml.j2 | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/roles/scripts/tasks/templates.yml b/roles/scripts/tasks/templates.yml index d11d978..6fa5b7c 100644 --- a/roles/scripts/tasks/templates.yml +++ b/roles/scripts/tasks/templates.yml @@ -25,3 +25,4 @@ dest: './build/scripts/modes.yaml' vars: xmasTree: true + season: winter diff --git a/roles/scripts/templates/modes.yaml.j2 b/roles/scripts/templates/modes.yaml.j2 index 6a51923..d970ca2 100644 --- a/roles/scripts/templates/modes.yaml.j2 +++ b/roles/scripts/templates/modes.yaml.j2 @@ -43,6 +43,7 @@ good_night: - service: lock.lock target: entity_id: lock.front_door_lock_doorlock +{% if season == 'summer' %} - choose: - conditions: - condition: numeric_state @@ -52,6 +53,7 @@ good_night: - service: climate.turn_off target: entity_id: climate.ac +{% endif %} - service: input_boolean.turn_off target: entity_id: input_boolean.pc_caffeine @@ -62,7 +64,6 @@ good_night: - service: script.tv_off - service: light.turn_off entity_id: - - light.wled_star - light.couch_lights - light.tv_lights - light.office @@ -80,6 +81,7 @@ good_night: - light.table_lamp_lights - light.lego_bookcase_light {% if xmasTree == true %} + - light.wled_star - light.twinkly_1 - light.twinkly_2 {% endif %} @@ -106,6 +108,7 @@ good_morning: {% if xmasTree == true %} - service: light.turn_on entity_id: + - light.wled_star - light.twinkly_1 - light.twinkly_2 {% endif %} @@ -178,9 +181,11 @@ leave_home: target: entity_id: lock.front_door_lock_doorlock - service: script.tv_off +{% if season == 'summer' %} - service: climate.turn_off target: entity_id: climate.ac +{% endif %} - service: script.vacuum_today - service: light.turn_off entity_id: @@ -202,6 +207,7 @@ leave_home: - light.table_lamp_lights - light.lego_bookcase_light {% if xmasTree == true %} + - light.wled_star - light.twinkly_1 - light.twinkly_2 {% endif %} @@ -233,6 +239,7 @@ arrive_home: entity_id: - light.lego_bookcase_light {% if xmasTree == true %} + - light.wled_star - light.twinkly_1 - light.twinkly_2 {% endif %}