From 0a085502e54ce8b2d6330d4c048481555fe9a0a1 Mon Sep 17 00:00:00 2001 From: ccostan Date: Thu, 22 Apr 2021 21:23:00 -0400 Subject: [PATCH] Making some changes to the Scripts. Shut down the garage lights only when the garage closes.^[[D --- config/packages/conico.yaml | 2 ++ config/packages/garadget.yaml | 27 +++++++++++++++------------ 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/config/packages/conico.yaml b/config/packages/conico.yaml index 35210eb6..4e89bebe 100755 --- a/config/packages/conico.yaml +++ b/config/packages/conico.yaml @@ -66,3 +66,5 @@ automation: entity_id: media_player.stacey_bedroom media_content_id: 'hide garage camera' media_content_type: custom + + - service: script.garage_lights_off diff --git a/config/packages/garadget.yaml b/config/packages/garadget.yaml index 056eee96..1e22e209 100755 --- a/config/packages/garadget.yaml +++ b/config/packages/garadget.yaml @@ -109,19 +109,22 @@ automation: for: '00:02:30' action: - # - service: > - # {% set hour=states("sensor.time").split(':')[0] | int %} - # {% if hour >= 7 and hour <= 9 and states.input_boolean.school_mode.state == 'on'%} - # input_boolean.turn_off - # {% else %} - # input_boolean.turn_on - # {% endif %} - # entity_id: input_boolean.alert_mode + - choose: + - conditions: "{{ is_state('cover.large_garage_door','closed') }}" + sequence: + - service: script.speech_engine + data: + DoorClosed: "The {{ trigger.entity_id.split('.')[1]|replace('_', ' ') }} is now {{ (trigger.to_state.state)|replace('_', ' ') }}." + call_garage_check: 1 + - delay: "00:20:00" + - service: script.garage_lights_off + + default: + - service: script.speech_engine + data: + DoorClosed: "The {{ trigger.entity_id.split('.')[1]|replace('_', ' ') }} is now {{ (trigger.to_state.state)|replace('_', ' ') }}." + call_garage_check: 1 - - service: script.speech_engine - data: - DoorClosed: "The {{ trigger.entity_id.split('.')[1]|replace('_', ' ') }} is now {{ (trigger.to_state.state)|replace('_', ' ') }}." - call_garage_check: 1 ################################### ## Garadget Wind Door Checks - [Garadget](https://amzn.to/2jQLpVQ)