From 905f73bfc5dbf96348b10d8504167d4c371c2737 Mon Sep 17 00:00:00 2001 From: CCOSTAN Date: Mon, 6 Mar 2017 19:33:11 +0000 Subject: [PATCH] Closes #99 - Don't want close alerts when I am sleeping. Period. --- automation/Speech/garage_closed.yaml | 18 ++++++++++++++++++ .../Speech/{garage.yaml => garage_opened.yaml} | 12 ++---------- configuration.yaml | 3 ++- 3 files changed, 22 insertions(+), 11 deletions(-) create mode 100755 automation/Speech/garage_closed.yaml rename automation/Speech/{garage.yaml => garage_opened.yaml} (79%) diff --git a/automation/Speech/garage_closed.yaml b/automation/Speech/garage_closed.yaml new file mode 100755 index 00000000..a7f66993 --- /dev/null +++ b/automation/Speech/garage_closed.yaml @@ -0,0 +1,18 @@ +###################################################################### +## Garage Status Announcements - Only during normal hours. +###################################################################### +- alias: 'Garage closed' + + trigger: + - platform: state + entity_id: + - cover.large_garage + - cover.small_garage + from: 'open' + to: 'closed' + for: '00:02:00' + + action: + - service: script.Voice_notify + data_template: + value1: "The {{ trigger.entity_id.split('.')[1]|replace('_', ' ')|replace('garadget large', 'large garage ')|replace('garadget small', 'small garage ') }} is now {{ (trigger.to_state.state)|replace('_', ' ') }}." diff --git a/automation/Speech/garage.yaml b/automation/Speech/garage_opened.yaml similarity index 79% rename from automation/Speech/garage.yaml rename to automation/Speech/garage_opened.yaml index 95e6b1f4..f9311ecd 100755 --- a/automation/Speech/garage.yaml +++ b/automation/Speech/garage_opened.yaml @@ -1,7 +1,7 @@ ###################################################################### ## Garage Status Announcements ###################################################################### -- alias: 'Garage Status' +- alias: 'Garage Opened' trigger: - platform: state @@ -12,18 +12,10 @@ to: 'open' for: '00:02:00' - - platform: state - entity_id: - - cover.large_garage - - cover.small_garage - from: 'open' - to: 'closed' - for: '00:02:00' - action: - service: input_boolean.turn_on entity_id: input_boolean.alert_mode - + - service: script.Voice_notify data_template: value1: "The {{ trigger.entity_id.split('.')[1]|replace('_', ' ')|replace('garadget large', 'large garage ')|replace('garadget small', 'small garage ') }} is now {{ (trigger.to_state.state)|replace('_', ' ') }}." diff --git a/configuration.yaml b/configuration.yaml index eea6e95d..8ba8b10b 100755 --- a/configuration.yaml +++ b/configuration.yaml @@ -87,7 +87,8 @@ history: entities: - sensor.last_boot - sensor.date -#logger: !include logger.yaml + +logger: !include logger.yaml recorder: