2017-02-15 01:34:50 +00:00
|
|
|
|
########## ############################################################
|
2017-02-03 22:11:33 +00:00
|
|
|
|
## Announce when people come or go.
|
2017-02-15 18:36:45 +00:00
|
|
|
|
## Announce over all Chromecast Audios
|
2017-02-03 22:11:33 +00:00
|
|
|
|
######################################################################
|
2017-02-14 00:26:22 +00:00
|
|
|
|
- alias: 'People Greeting'
|
2017-02-15 18:36:45 +00:00
|
|
|
|
|
2017-02-03 21:34:35 +00:00
|
|
|
|
trigger:
|
2017-02-04 02:11:01 +00:00
|
|
|
|
- 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'
|
2017-02-04 22:52:11 +00:00
|
|
|
|
for: '00:02:00'
|
2017-02-15 18:36:45 +00:00
|
|
|
|
|
2017-02-03 21:34:35 +00:00
|
|
|
|
action:
|
2017-02-03 22:11:33 +00:00
|
|
|
|
- service: script.Voice_notify
|
2017-02-04 22:52:11 +00:00
|
|
|
|
data_template:
|
2017-02-14 00:34:37 +00:00
|
|
|
|
value1: >
|
2017-02-15 01:34:50 +00:00
|
|
|
|
{% set person = trigger.entity_id.split('.')[1]|replace('_', ' ')%}
|
2017-02-15 18:36:45 +00:00
|
|
|
|
{%- macro greeting_sentence(person) -%}
|
2017-02-15 02:29:08 +00:00
|
|
|
|
{{ [
|
2017-03-12 05:24:56 +00:00
|
|
|
|
"Welcome back home " ~ person,
|
2017-02-15 02:29:08 +00:00
|
|
|
|
"Guess who is home? " ~ person +" is!",
|
2017-03-12 05:24:56 +00:00
|
|
|
|
"Attention! " ~ person + " is now in the house.",
|
|
|
|
|
"Welcome Home " ~ person + ". We've missed you. Or at least Molly did.",
|
2017-02-15 02:29:08 +00:00
|
|
|
|
"Our home is now complete, Rest your head and relax your feet! Welcome Back " ~ person,
|
2017-02-15 18:36:45 +00:00
|
|
|
|
"Life is like a song, you’re back where you belong. Welcome home " ~ person,
|
2017-02-24 19:51:54 +00:00
|
|
|
|
"Hey there " ~ person + " Welcome Home!",
|
2017-03-12 05:24:56 +00:00
|
|
|
|
"Knock Knock. Who is There? " ~ person +" is!",
|
2017-02-15 02:29:08 +00:00
|
|
|
|
person ~ "! You're home!"
|
2017-02-15 18:36:45 +00:00
|
|
|
|
] | random }}
|
|
|
|
|
{%- endmacro -%}
|
|
|
|
|
"{{greeting_sentence(person)}}"
|