Add names in presence detection

This commit is contained in:
2022-05-28 19:53:16 +03:00
parent c233751b6b
commit bb5a45f601
2 changed files with 12 additions and 5 deletions
@@ -6,6 +6,7 @@ blueprint:
domain: automation domain: automation
input: input:
person: person:
name:
input_boolean: input_boolean:
trigger: trigger:
@@ -18,17 +19,22 @@ condition:
entity_id: !input input_boolean entity_id: !input input_boolean
state: "off" state: "off"
variables:
name: !input name
action: action:
- service: notify.telegram - service: notify.telegram
data: data_template:
title: "🏠 *Presence Module · Arrival Detection*" title: "🏠 *Presence Module · Arrival Detection*"
message: "Device marked as home. Waiting for door to open!" message: >-
{{ name + "\'s device marked as home. Waiting for door to open!" }}
- wait_template: "{{ is_state('binary_sensor.front_door', 'on') }}" - wait_template: "{{ is_state('binary_sensor.front_door', 'on') }}"
continue_on_timeout: false continue_on_timeout: false
timeout: 00:15:00 timeout: 00:15:00
- service: input_boolean.turn_on - service: input_boolean.turn_on
entity_id: !input input_boolean entity_id: !input input_boolean
- service: notify.telegram - service: notify.telegram
data: data_template:
title: "🏠 *Presence Module · Arrival Detection*" title: "🏠 *Presence Module · Arrival Detection*"
message: "✅ Hey, I've marked you as home now!" message: >-
{{ "✅ Hey, I've marked " + name + " as home now!" }}
+2 -1
View File
@@ -59,7 +59,6 @@ binary_sensor:
{% else %} mdi:account-off-outline {% else %} mdi:account-off-outline
{% endif %} {% endif %}
multisensor_motion: multisensor_motion:
friendly_name: MultiSensor motion friendly_name: MultiSensor motion
device_class: motion device_class: motion
@@ -91,6 +90,7 @@ automation:
path: arrival_detection.yaml path: arrival_detection.yaml
input: input:
person: person.georgi person: person.georgi
name: Georgi
input_boolean: input_boolean.georgi_home input_boolean: input_boolean.georgi_home
- alias: Presence · Player 2 Arrival detection - alias: Presence · Player 2 Arrival detection
@@ -98,6 +98,7 @@ automation:
path: arrival_detection.yaml path: arrival_detection.yaml
input: input:
person: person.player_2 person: person.player_2
name: Maya
input_boolean: input_boolean.player_2_home input_boolean: input_boolean.player_2_home
- alias: Presence · Player 2 Arrival best effort - alias: Presence · Player 2 Arrival best effort