Improved security automations across the board

This commit is contained in:
2022-12-05 18:15:03 -05:00
parent 4ef79b5d5a
commit f23d4016b0

View File

@ -183,31 +183,27 @@ automation:
from: "off" from: "off"
to: "on" to: "on"
action: action:
- if: - service: scene.create
- 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: data:
color_name: red scene_id: light_state_before_lockdown_issue
brightness_pct: 100 snapshot_entities:
- if: - light.living_room_color_1
- condition: state - light.living_room_color_2
entity_id: light.tina_lamp - light.living_room_color_3
state: 'on' - light.tina_lamp_side
then: - light.tina_lamp_top
- delay:
seconds: 1
- service: switch.turn_off - service: switch.turn_off
target: target:
entity_id: switch.adaptive_lighting_tina_lamp entity_id:
- switch.adaptive_lighting_living_room
- switch.adaptive_lighting_tina_lamp
- service: light.turn_on - service: light.turn_on
target: target:
entity_id: light.tina_lamp entity_id:
- light.living_room_lights
- light.tina_lamp
data: data:
color_name: red color_name: red
brightness_pct: 100 brightness_pct: 100
@ -216,7 +212,7 @@ automation:
who: common who: common
call_interruption: 1 call_interruption: 1
call_lockdown_issue: 1 call_lockdown_issue: 1
- wait_template: "{{ is_state('sensor.total_faults','0') }}" - wait_template: "{{ is_state('binary_sensor.security_faults','off') }}"
timeout: timeout:
minutes: 10 minutes: 10
- service: input_boolean.turn_off - service: input_boolean.turn_off
@ -226,8 +222,8 @@ automation:
seconds: 3 seconds: 3
- if: - if:
- condition: state - condition: state
entity_id: sensor.total_faults entity_id: binary_sensor.security_faults
state: '0' state: 'off'
then: then:
- if: - if:
- condition: state - condition: state
@ -246,26 +242,16 @@ automation:
data: data:
who: common who: common
message: 'I am unable to resolve the security issue, so I am giving up. Please report the issue to Tony if applicable.' message: 'I am unable to resolve the security issue, so I am giving up. Please report the issue to Tony if applicable.'
- if: - service: scene.turn_on
- condition: state
entity_id: light.living_room_lights
state: 'on'
then:
service: input_select.select_option
target: target:
entity_id: input_select.living_room_scenes entity_id: scene.light_state_before_lockdown_issue
data: - delay:
option: Adaptive seconds: 3
- if: - service: switch.turn_on
- condition: state
entity_id: light.tina_lamp
state: 'on'
then:
- service: input_select.select_option
target: target:
entity_id: input_text.tina_lamp_selected_scene entity_id:
data: - switch.adaptive_lighting_living_room
option: Adaptive - switch.adaptive_lighting_tina_lamp
script: script:
security_arm_home: security_arm_home:
@ -273,8 +259,8 @@ script:
sequence: sequence:
- if: - if:
- condition: state - condition: state
entity_id: sensor.total_faults entity_id: binary_sensor.security_faults
state: '0' state: 'off'
then: then:
- service: alarm_control_panel.alarm_arm_home - service: alarm_control_panel.alarm_arm_home
target: target:
@ -299,8 +285,8 @@ script:
sequence: sequence:
- if: - if:
- condition: state - condition: state
entity_id: sensor.total_faults entity_id: binary_sensor.security_faults
state: '0' state: 'off'
then: then:
- service: alarm_control_panel.alarm_arm_away - service: alarm_control_panel.alarm_arm_away
target: target: