2018-01-01 19:00:45 -05:00
|
|
|
########## ############################################################
|
2020-06-08 16:46:42 -04:00
|
|
|
# @CCOSTAN
|
|
|
|
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
|
2018-01-01 19:00:45 -05:00
|
|
|
## Announce when people come or go.
|
|
|
|
## Announce over all Chromecast Audios
|
2020-06-08 16:50:37 -04:00
|
|
|
# Read more at https://vCloudInfo.com
|
2018-01-01 19:00:45 -05:00
|
|
|
######################################################################
|
|
|
|
- alias: 'People Greeting'
|
2020-07-19 13:39:29 -04:00
|
|
|
id: 29c5c9dd-550a-4761-a224-78cdc3dd9f43
|
2020-07-19 14:15:54 -04:00
|
|
|
mode: restart
|
2018-01-01 19:00:45 -05:00
|
|
|
trigger:
|
|
|
|
- platform: state
|
|
|
|
entity_id:
|
2020-08-08 19:10:36 -04:00
|
|
|
- person.carlo
|
|
|
|
- person.stacey
|
2023-10-02 18:55:06 +00:00
|
|
|
- person.paige
|
|
|
|
- person.justin
|
2018-01-01 19:00:45 -05:00
|
|
|
from: 'not_home'
|
|
|
|
to: 'home'
|
|
|
|
|
|
|
|
action:
|
2020-06-08 16:46:42 -04:00
|
|
|
# This Group is defined in the groups directory.
|
2023-11-08 15:08:14 +00:00
|
|
|
|
2020-06-08 16:46:42 -04:00
|
|
|
- service: group.set
|
2020-09-26 10:52:45 -04:00
|
|
|
data:
|
2020-06-08 16:58:33 -04:00
|
|
|
object_id: "arriving"
|
2020-06-08 16:46:42 -04:00
|
|
|
add_entities: >-
|
|
|
|
{{ trigger.to_state.entity_id }}
|
|
|
|
|
2020-07-29 20:04:02 -04:00
|
|
|
- wait_template: "{{ states.binary_sensor.mcu1_gpio12.state == 'on' }}"
|
2020-09-07 20:49:20 -04:00
|
|
|
timeout: '00:05:00'
|
2020-07-29 20:04:02 -04:00
|
|
|
|
|
|
|
- wait_template: "{{ states.binary_sensor.kitchen_door.state == 'on' }}"
|
|
|
|
timeout: '00:1:00'
|
|
|
|
|
2020-06-08 17:08:56 -04:00
|
|
|
- delay: '00:01:00'
|
2018-01-01 19:00:45 -05:00
|
|
|
- service: script.speech_engine
|
2020-09-26 10:52:45 -04:00
|
|
|
data:
|
2018-01-01 19:00:45 -05:00
|
|
|
personarriving: >
|
2020-06-08 16:46:42 -04:00
|
|
|
{% set person = expand('group.arriving')|map(attribute='name')|join(' and ') %}
|
2024-06-21 21:56:01 +00:00
|
|
|
{%- macro greeting_sentence(person) -%}
|
|
|
|
{{ ["[Welcome " ~ person + " home]"] }}
|
2018-01-01 19:00:45 -05:00
|
|
|
{%- endmacro -%}
|
2022-06-24 09:43:42 -04:00
|
|
|
|
2024-06-21 21:56:01 +00:00
|
|
|
{{greeting_sentence(person)}}
|
2018-01-01 19:00:45 -05:00
|
|
|
call_responsibilities: 1
|
|
|
|
call_no_announcement: 1
|
|
|
|
call_garage_check: 1
|
|
|
|
call_window_check: 1
|
2020-06-08 16:46:42 -04:00
|
|
|
|
|
|
|
- service: group.set
|
2020-09-26 10:52:45 -04:00
|
|
|
data:
|
2020-06-08 16:58:33 -04:00
|
|
|
object_id: "arriving"
|
2020-06-08 16:46:42 -04:00
|
|
|
entities: []
|
2020-07-29 19:54:10 -04:00
|
|
|
|