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: