2017-02-14 21:51:41 +00:00

32 lines
1.4 KiB
YAML
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

######################################################################
## Announce when people come or go.
## Announce over all Chromecast Audios
######################################################################
- alias: 'People Greeting'
trigger:
- platform: state
entity_id:
- device_tracker.carlo
- device_tracker.stacey
- device_tracker.franco
- device_tracker.yolanda
- device_tracker.joyce_ipad
from: 'not_home'
to: 'home'
for: '00:02:00'
action:
- service: script.Voice_notify
data_template:
value1: >
{{ [
"Welcome home {%trigger.entity_id.split('.')[1]|replace('_', ' ')%}",
"Guess who is home? {{ trigger.entity_id.split('.')[1]|replace('_', ' ')}} is!",
"Attention: {{trigger.entity_id.split('.')[1]|replace('_', ' ')}} is now in the house.",
"{{ trigger.entity_id.split('.')[1]|replace('_', ' ')}} in da house!",
"Welcome Home {{ trigger.entity_id.split('.')[1]|replace('_', ' ')}}. We've missed you. or at least Molly did.",
"Our home is now complete, Rest your head and relax your feet! Welcome Back {{ trigger.entity_id.split('.')[1]|replace('_', ' ')}}",
"Life is like a song, youre back where you belong. Welcome home {{ trigger.entity_id.split('.')[1]|replace('_', ' ')}}"
] | random }}