Files
fresh-home/automations/people/person_left.yaml
T
2025-10-10 20:24:52 -04:00

47 lines
1.5 KiB
YAML

alias: Person Left
id: automation_person_left
mode: queued
trigger:
- platform: state
entity_id:
- input_boolean.clint_home
- input_boolean.emmett_home
- input_boolean.bridget_home
- input_boolean.kristy_home
- input_boolean.marshall_home
- input_boolean.tess_home
- input_boolean.ebin_home
- input_boolean.guest_home
from: "on"
to: "off"
action:
- action: input_select.select_option
data_template:
entity_id: >
{% if trigger.entity_id == 'input_boolean.clint_home' %}
input_select.clint_status_dropdown
{% elif trigger.entity_id == 'input_boolean.emmett_home' %}
input_select.emmett_status_dropdown
{% elif trigger.entity_id == 'input_boolean.bridget_home' %}
input_select.bridget_status_dropdown
{% elif trigger.entity_id == 'input_boolean.kristy_home' %}
input_select.kristy_status_dropdown
{% elif trigger.entity_id == 'input_boolean.marshall_home' %}
input_select.marshall_status_dropdown
{% elif trigger.entity_id == 'input_boolean.tess_home' %}
input_select.tess_status_dropdown
{% elif trigger.entity_id == 'input_boolean.ebin_home' %}
input_select.ebin_status_dropdown
{% else %}
input_select.guest_status_dropdown
{% endif %}
option: Just Left
- action: logbook.log
data_template:
name: Person Left
entity_id: automation.person_left
message: >
Person Left ran