2024-09-03 18:08:43 +00:00
|
|
|
#-------------------------------------------
|
|
|
|
# People Greeting Announcement
|
|
|
|
# Description: Announces when family members arrive home
|
|
|
|
#
|
|
|
|
# Features:
|
|
|
|
# - Triggers when a person's state changes from 'not_home' to 'home'
|
|
|
|
# - Waits for specific sensors to confirm entry
|
|
|
|
# - Uses speech_engine script for personalized welcome messages
|
|
|
|
# - Includes responsibility reminders and home status checks
|
|
|
|
#
|
|
|
|
# Integration: Uses ChromeCast for audio output
|
|
|
|
# Follow me https://www.vcloudinfo.com/click-here
|
|
|
|
# More Blog Posts: https://www.vcloudinfo.com
|
|
|
|
#-------------------------------------------
|
2018-01-02 00:00:45 +00:00
|
|
|
- alias: 'People Greeting'
|
2020-07-19 17:39:29 +00:00
|
|
|
id: 29c5c9dd-550a-4761-a224-78cdc3dd9f43
|
2020-07-19 18:15:54 +00:00
|
|
|
mode: restart
|
2018-01-02 00:00:45 +00:00
|
|
|
trigger:
|
|
|
|
- platform: state
|
|
|
|
entity_id:
|
2020-08-08 23:10:36 +00:00
|
|
|
- person.carlo
|
|
|
|
- person.stacey
|
2023-10-02 18:55:06 +00:00
|
|
|
- person.paige
|
|
|
|
- person.justin
|
2018-01-02 00:00:45 +00:00
|
|
|
from: 'not_home'
|
|
|
|
to: 'home'
|
|
|
|
|
|
|
|
action:
|
2020-06-08 20:46:42 +00:00
|
|
|
# This Group is defined in the groups directory.
|
2023-11-08 15:08:14 +00:00
|
|
|
|
2020-06-08 20:46:42 +00:00
|
|
|
- service: group.set
|
2020-09-26 14:52:45 +00:00
|
|
|
data:
|
2020-06-08 20:58:33 +00:00
|
|
|
object_id: "arriving"
|
2020-06-08 20:46:42 +00:00
|
|
|
add_entities: >-
|
|
|
|
{{ trigger.to_state.entity_id }}
|
|
|
|
|
2020-07-30 00:04:02 +00:00
|
|
|
- wait_template: "{{ states.binary_sensor.mcu1_gpio12.state == 'on' }}"
|
2020-09-08 00:49:20 +00:00
|
|
|
timeout: '00:05:00'
|
2020-07-30 00:04:02 +00:00
|
|
|
|
|
|
|
- wait_template: "{{ states.binary_sensor.kitchen_door.state == 'on' }}"
|
|
|
|
timeout: '00:1:00'
|
|
|
|
|
2020-06-08 21:08:56 +00:00
|
|
|
- delay: '00:01:00'
|
2018-01-02 00:00:45 +00:00
|
|
|
- service: script.speech_engine
|
2020-09-26 14:52:45 +00:00
|
|
|
data:
|
2018-01-02 00:00:45 +00:00
|
|
|
personarriving: >
|
2020-06-08 20:46:42 +00:00
|
|
|
{% set person = expand('group.arriving')|map(attribute='name')|join(' and ') %}
|
2024-06-21 21:56:01 +00:00
|
|
|
{%- macro greeting_sentence(person) -%}
|
2024-07-24 05:48:36 +00:00
|
|
|
{{"[Welcome " + person + " home]" }}
|
2018-01-02 00:00:45 +00:00
|
|
|
{%- endmacro -%}
|
2022-06-24 13:43:42 +00:00
|
|
|
|
2024-06-21 21:56:01 +00:00
|
|
|
{{greeting_sentence(person)}}
|
2018-01-02 00:00:45 +00:00
|
|
|
call_responsibilities: 1
|
|
|
|
call_no_announcement: 1
|
|
|
|
call_garage_check: 1
|
|
|
|
call_window_check: 1
|
2020-06-08 20:46:42 +00:00
|
|
|
|
|
|
|
- service: group.set
|
2020-09-26 14:52:45 +00:00
|
|
|
data:
|
2020-06-08 20:58:33 +00:00
|
|
|
object_id: "arriving"
|
2020-06-08 20:46:42 +00:00
|
|
|
entities: []
|
2020-07-29 23:54:10 +00:00
|
|
|
|