Simplify sleep mode automations
This commit is contained in:
parent
981cdcdbd4
commit
3b162d0767
@ -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
|
||||||
|
@ -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:
|
||||||
|
Loading…
Reference in New Issue
Block a user