From d6ae71548b8fc72a13ff3b7c8a1d7ac822faa7de Mon Sep 17 00:00:00 2001 From: CCOSTAN Date: Thu, 1 Dec 2016 05:14:47 +0000 Subject: [PATCH] More scripting and reusable codes --- automation/away.yaml | 13 ++----------- script/switch_turn_off.yaml | 12 +++++++++--- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/automation/away.yaml b/automation/away.yaml index f7406e17..e34500f2 100755 --- a/automation/away.yaml +++ b/automation/away.yaml @@ -27,16 +27,7 @@ action: - service: light.turn_off entity_id: group.interior_lights - - service: switch.turn_off - entity_id: group.amps - - delay: 00:01:00 - - service: switch.turn_off - entity_id: switch.foyer_outlet - - delay: 00:01:00 - - service: switch.turn_off - entity_id: switch.kitchen_accents - - delay: 00:01:00 - - service: switch.turn_off - entity_id: switch.garage_outlet + - service: script.switch_turn_off_all + \ No newline at end of file diff --git a/script/switch_turn_off.yaml b/script/switch_turn_off.yaml index 1b81f064..e413a1ac 100755 --- a/script/switch_turn_off.yaml +++ b/script/switch_turn_off.yaml @@ -1,8 +1,8 @@ ###################################################################################################### -###Script to send notifications to IFTTT to notify me on the mobile Phone! Call like this: +###Script to shut switches with a 30 second delay to not trample codes ###################################################################################################### -switch_turn_off: +switch_turn_off_all: sequence: - service: switch.turn_off entity_id: switch.halloween_lights_den @@ -18,4 +18,10 @@ switch_turn_off: - delay: '00:00:30' - service: switch.turn_off entity_id: switch.printer_outlet - - delay: '00:00:30' \ No newline at end of file + - delay: '00:00:30' + - service: switch.turn_off + entity_id: switch.garage_outlet + - delay: 00:01:00 + - service: switch.turn_off + entity_id: group.amps + \ No newline at end of file