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: 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: state
entity_id: group.guests
state: not_home
- condition: time
before: input_datetime.day_mode
after: input_datetime.sleep_mode
action: action:
- service: input_boolean.turn_on - service: input_boolean.turn_on
entity_id: input_boolean.sleep_mode entity_id: input_boolean.sleep_mode

View File

@ -3,22 +3,14 @@
- id: sleep_on_{{ light.entityId }} - id: sleep_on_{{ light.entityId }}
alias: '[Sleep-On] {{ light.name }}' alias: '[Sleep-On] {{ light.name }}'
trigger: trigger:
- platform: time
at: input_datetime.sleep_mode
- platform: state - platform: state
entity_id: entity_id:
- group.guests - input_boolean.sleep_mode
to: not_home to: 'on'
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: