mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-09 10:30:14 -04:00
102 lines
3.5 KiB
YAML
102 lines
3.5 KiB
YAML
alias: Person Arrived
|
|
id: automation_person_arrived
|
|
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: "off"
|
|
to: "on"
|
|
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: >
|
|
{% if trigger.entity_id == 'input_boolean.kristy_home' %}
|
|
{% if states.input_select.kristy_status_dropdown.state == 'Just Left' %}
|
|
Home
|
|
{% else %}
|
|
Just Arrived
|
|
{% endif %}
|
|
{% elif trigger.entity_id == 'input_boolean.marshall_home' %}
|
|
{% if states.input_select.marshall_status_dropdown.state == 'Just Left' %}
|
|
Home
|
|
{% else %}
|
|
Just Arrived
|
|
{% endif %}
|
|
{% elif trigger.entity_id == 'input_boolean.clint_home' %}
|
|
{% if states.input_select.clint_status_dropdown.state == 'Just Left' %}
|
|
Home
|
|
{% else %}
|
|
Just Arrived
|
|
{% endif %}
|
|
{% elif trigger.entity_id == 'input_boolean.emmett_home' %}
|
|
{% if states.input_select.emmett_status_dropdown.state == 'Just Left' %}
|
|
Home
|
|
{% else %}
|
|
Just Arrived
|
|
{% endif %}
|
|
{% elif trigger.entity_id == 'input_boolean.bridget_home' %}
|
|
{% if states.input_select.bridget_status_dropdown.state == 'Just Left' %}
|
|
Home
|
|
{% else %}
|
|
Just Arrived
|
|
{% endif %}
|
|
{% elif trigger.entity_id == 'input_boolean.ebin_home' %}
|
|
{% if states.input_select.ebin_status_dropdown.state == 'Just Left' %}
|
|
Home
|
|
{% else %}
|
|
Just Arrived
|
|
{% endif %}
|
|
{% elif trigger.entity_id == 'input_boolean.tess_home' %}
|
|
{% if states.input_select.tess_status_dropdown.state == 'Just Left' %}
|
|
Home
|
|
{% else %}
|
|
Just Arrived
|
|
{% endif %}
|
|
{% else %}
|
|
{% if states.input_select.guest_status_dropdown.state == 'Just Left' %}
|
|
Home
|
|
{% else %}
|
|
Just Arrived
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
- action: logbook.log
|
|
data_template:
|
|
name: Person Arrived
|
|
entity_id: automation.person_arrived
|
|
message: >
|
|
Person Arrived ran
|
|
|
|
- action: input_boolean.turn_off
|
|
entity_id: input_boolean.all_away
|
|
|
|
- action: input_boolean.turn_on
|
|
entity_id: input_boolean.home_occupied
|