From 29897b1b6234c8b4ae2870c814cff3da55cebdbf Mon Sep 17 00:00:00 2001 From: Tony Stork Date: Thu, 1 Dec 2022 20:33:03 -0500 Subject: [PATCH] Involve the lights if there is an issue arming security #60 --- packages/security.yaml | 48 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/packages/security.yaml b/packages/security.yaml index 6d513c2..dc75982 100644 --- a/packages/security.yaml +++ b/packages/security.yaml @@ -183,6 +183,34 @@ automation: from: "off" to: "on" action: + - if: + - condition: state + entity_id: light.living_room_lights + state: 'on' + then: + - service: switch.turn_off + target: + entity_id: switch.adaptive_lighting_living_room + - service: light.turn_on + target: + entity_id: light.living_room_lights + data: + color_name: red + brightness_pct: 100 + - if: + - condition: state + entity_id: light.tina_lamp + state: 'on' + then: + - service: switch.turn_off + target: + entity_id: switch.adaptive_lighting_tina_lamp + - service: light.turn_on + target: + entity_id: light.tina_lamp + data: + color_name: red + brightness_pct: 100 - service: script.status_annc data_template: who: common @@ -218,6 +246,26 @@ automation: data: who: common message: 'I am unable to resolve the security issue, so I am giving up. Please report the issue to Tony if applicable.' + - if: + - condition: state + entity_id: light.living_room_lights + state: 'on' + then: + service: input_select.select_option + target: + entity_id: input_select.living_room_scenes + data: + option: Adaptive + - if: + - condition: state + entity_id: light.tina_lamp + state: 'on' + then: + - service: input_select.select_option + target: + entity_id: input_text.tina_lamp_selected_scene + data: + option: Adaptive script: security_arm_home: