diff --git a/automation/away.yaml b/automation/away.yaml index e34500f2..b9f30351 100755 --- a/automation/away.yaml +++ b/automation/away.yaml @@ -15,19 +15,15 @@ state: not_home condition: - condition: and - conditions: - - condition: state - entity_id: group.family - state: not_home - - condition: state - entity_id: input_boolean.guest_mode - state: 'off' + - condition: state + entity_id: group.family + state: 'not_home ' + - condition: state + entity_id: input_boolean.guest_mode + state: 'off' action: - - service: light.turn_off - entity_id: group.interior_lights - - service: script.switch_turn_off_all + - service: script.interior_off \ No newline at end of file diff --git a/automation/good_night.yaml b/automation/good_night.yaml index 6f9b8b90..cb1dbcab 100755 --- a/automation/good_night.yaml +++ b/automation/good_night.yaml @@ -7,19 +7,12 @@ - platform: event event_type: good_night - condition: - - condition: state - entity_id: group.family - state: home + # condition: + # - condition: state + # entity_id: group.family + # state: home action: - - service: light.turn_off - entity_id: - - group.interior_lights - - service: switch.turn_off - entity_id: switch.kitchen_accents - - - - + - service: script.interior_off + \ No newline at end of file diff --git a/automation/sunrise_turnon_and_off.yaml b/automation/sunrise_turnon_and_off.yaml index beb9e69d..f504d0e6 100755 --- a/automation/sunrise_turnon_and_off.yaml +++ b/automation/sunrise_turnon_and_off.yaml @@ -35,6 +35,8 @@ action: - service: light.turn_off entity_id: group.all_lights + - service: script.interior_off + - delay: '00:01:00' - service: script.switch_turn_off_all diff --git a/script/interior_off.yaml b/script/interior_off.yaml new file mode 100755 index 00000000..f940372b --- /dev/null +++ b/script/interior_off.yaml @@ -0,0 +1,30 @@ +###################################################################################################### +###Script to shut switches with a 30 second delay to not trample codes +### Sample Call +# action: +# - service: script.interior_off +###################################################################################################### + +interior_off: + sequence: + - service: light.turn_off + entity_id: + - group.interior_lights + - service: switch.turn_off + entity_id: switch.kitchen_accents + - delay: '00:00:30' + - service: switch.turn_off + entity_id: switch.foyer_outlet + - delay: '00:00:30' + - service: switch.turn_off + entity_id: switch.living_room_outlet + - delay: '00:00:30' + - service: switch.turn_off + entity_id: switch.printer + - delay: '00:01:00' + - service: switch.turn_off + entity_id: switch.garage_outlet + - delay: '00:01:00' + - service: switch.turn_off + entity_id: switch.living_room_amp + \ No newline at end of file