forked from CiquattroFPV/Homeassistant-Example-Config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
announcements.yaml
28 lines (28 loc) · 1.07 KB
/
announcements.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#alias: 'People Greeting'
#trigger:
#- platform: state
#entity_id:
#- device_tracker.my_my
#- device_tracker.person_person
#- device_tracker.iphonemarie
#from: 'not_home'
#to: 'home'
#for: '00:02:00'
#action:
#- service: script.Voice_notify
#data_template:
#value1: >
#{% set person = trigger.entity_id.split('.')[1]|replace('_', ' ')%}
#{%- macro greeting_sentence(person) -%}
#{{ [
#"Welcome home " ~ person,
#"Guess who is home? " ~ person +" is!",
#"Attention: " ~ person + " is now in the house.",
#"Welcome Home " ~ person + ". We've missed you. or at least Molly did.",
#"Our home is now complete, Rest your head and relax your feet! Welcome Back " ~ person,
#"Life is like a song, you’re back where you belong. Welcome home " ~ person,
#"Hey there " ~ person + " Welcome Home!",
#person ~ "! You're home!"
#] | random }}
#{%- endmacro -%}
#"{{greeting_sentence(person)}}"