1
0

Simplify sleep mode automations

This commit is contained in:
Przemek Grondek 2022-05-17 19:05:26 +02:00
parent 981cdcdbd4
commit 3b162d0767
2 changed files with 13 additions and 10 deletions

View File

@ -3,6 +3,17 @@
trigger:
- platform: time
at: input_datetime.sleep_mode
- platform: state
entity_id:
- group.guests
to: not_home
condition:
- condition: state
entity_id: group.guests
state: not_home
- condition: time
before: input_datetime.day_mode
after: input_datetime.sleep_mode
action:
- service: input_boolean.turn_on
entity_id: input_boolean.sleep_mode

View File

@ -3,22 +3,14 @@
- id: sleep_on_{{ light.entityId }}
alias: '[Sleep-On] {{ light.name }}'
trigger:
- platform: time
at: input_datetime.sleep_mode
- platform: state
entity_id:
- group.guests
to: not_home
- input_boolean.sleep_mode
to: 'on'
condition:
- condition: state
entity_id: {{ light.entityId }}
state: 'on'
- condition: state
entity_id: group.guests
state: not_home
- condition: time
before: input_datetime.day_mode
after: input_datetime.sleep_mode
action:
- service: light.turn_on
data: