mirror of
https://github.com/CCOSTAN/Home-AssistantConfig.git
synced 2025-11-06 17:51:36 +00:00
Closes #99 - Don't want close alerts when I am sleeping. Period.
This commit is contained in:
18
automation/Speech/garage_closed.yaml
Executable file
18
automation/Speech/garage_closed.yaml
Executable file
@@ -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('_', ' ') }}."
|
||||
@@ -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('_', ' ') }}."
|
||||
@@ -87,7 +87,8 @@ history:
|
||||
entities:
|
||||
- sensor.last_boot
|
||||
- sensor.date
|
||||
#logger: !include logger.yaml
|
||||
|
||||
logger: !include logger.yaml
|
||||
|
||||
|
||||
recorder:
|
||||
|
||||
Reference in New Issue
Block a user