Break out the Garage and people announcements.

This commit is contained in:
CCOSTAN 2017-02-14 00:26:22 +00:00
parent 4b85d0cad0
commit 45d69b9e1e
3 changed files with 29 additions and 11 deletions

View File

@ -2,7 +2,7 @@
## Announce when people come or go.
## Announce over all Chromecast Audios
######################################################################
- alias: 'State Announcements'
- alias: 'People Greeting'
trigger:
- platform: state
@ -16,15 +16,7 @@
to: 'home'
for: '00:02:00'
- platform: state
entity_id:
- cover.garadget_large
- cover.garadget_small
from: 'closed'
to: 'open'
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 {{ (trigger.to_state.state)|replace('_', ' ') }}."
value1: "{{ trigger.entity_id.split('.')[1]|replace('_', ' ')}} is {{ (trigger.to_state.state)|replace('_', ' ') }}."

26
automation/Speech/garage.yaml Executable file
View File

@ -0,0 +1,26 @@
######################################################################
## Garage Status Announcements
######################################################################
- alias: 'Garage Status'
trigger:
- platform: state
entity_id:
- cover.garadget_large
- cover.garadget_small
from: 'closed'
to: 'open'
for: '00:02:00'
- platform: state
entity_id:
- cover.garadget_large
- cover.garadget_small
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('_', ' ') }}."

View File

@ -15,7 +15,7 @@
- service: script.Voice_notify
data_template:
value1: >
"Welcome Home {{ trigger.entity_id.split('.')[1]|replace('_', ' ') }}. Here is what's going on around the house right now:
"Welcome Home Costanzo Family. Here is what's going on around the house right now:
{%if now().strftime("%a") == 'Wed' or now().strftime("%a") == 'Sun'%}
Today is {{now().strftime("%A")}} and {{now().strftime("%A")}} is garbage day. Please be sure to tell the kids to take out the trash.
{%endif%}