mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-10 02:50:12 -04:00
initial push
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
alias: 'Home occupied'
|
||||
id: automation_home_occupied
|
||||
mode: single
|
||||
max_exceeded: silent
|
||||
|
||||
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_mode
|
||||
to: 'on'
|
||||
- platform: state
|
||||
entity_id: cover.garage_door
|
||||
from: 'off'
|
||||
to: 'on'
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.home_occupied
|
||||
state: 'off'
|
||||
# One person is home
|
||||
- condition: numeric_state
|
||||
entity_id: group.person_household
|
||||
above: 0
|
||||
value_template: "{{ dict((states|selectattr('entity_id', 'in', state_attr('group.person_household', 'entity_id'))|list)|groupby('state'))['on']|count }}"
|
||||
action:
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.home_occupied
|
||||
- service: automation.turn_off
|
||||
data:
|
||||
entity_id: automation.garage_open_nobody_home
|
||||
Reference in New Issue
Block a user