mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-09 18:40:14 -04:00
23 lines
617 B
YAML
23 lines
617 B
YAML
alias: "Tess Home"
|
|
id: automation_tess_home
|
|
mode: restart
|
|
|
|
trigger:
|
|
- platform: event
|
|
event_type: automation_reloaded
|
|
|
|
condition:
|
|
- alias: "They were previously considered away"
|
|
condition: state
|
|
entity_id: input_boolean.tess_home
|
|
state: "off"
|
|
|
|
- alias: "At least one tracker is home"
|
|
condition: numeric_state
|
|
entity_id: group.person_tess
|
|
above: 0
|
|
value_template: "{{ dict((states|selectattr('entity_id', 'in', state_attr('group.person_tess', 'entity_id'))|list)|groupby('state'))['home']|count }}"
|
|
action:
|
|
- action: input_boolean.turn_on
|
|
entity_id: input_boolean.tess_home
|