1
0

Handle lights differently when guest are at home

This commit is contained in:
Przemek Grondek 2022-05-17 19:01:31 +02:00
parent 5a19fdb941
commit 981cdcdbd4
2 changed files with 18 additions and 1 deletions

View File

@ -7,4 +7,11 @@ vacuum_rooms:
- input_boolean.vacuum_kitchen - input_boolean.vacuum_kitchen
- input_boolean.vacuum_hallway - input_boolean.vacuum_hallway
- input_boolean.vacuum_bedroom - input_boolean.vacuum_bedroom
- input_boolean.vacuum_bathroom - input_boolean.vacuum_bathroom
guests:
entities:
- person.mariusz_ablewicz
- person.andrzej_legowski
- person.matka
- person.piotr_madej

View File

@ -5,10 +5,20 @@
trigger: trigger:
- platform: time - platform: time
at: input_datetime.sleep_mode at: input_datetime.sleep_mode
- platform: state
entity_id:
- group.guests
to: not_home
condition: condition:
- condition: state - condition: state
entity_id: {{ light.entityId }} entity_id: {{ light.entityId }}
state: 'on' state: 'on'
- condition: state
entity_id: group.guests
state: not_home
- condition: time
before: input_datetime.day_mode
after: input_datetime.sleep_mode
action: action:
- service: light.turn_on - service: light.turn_on
data: data: