[Behaviour] Switch trigger from set time to offset from wakeup
This commit is contained in:
parent
81473d9eec
commit
cac9abe05f
@ -1,11 +1,15 @@
|
|||||||
- id: goto_sleep
|
- id: goto_sleep
|
||||||
alias: '[Behaviour] Go to sleep'
|
alias: '[Behaviour] Go to sleep'
|
||||||
description: ''
|
mode: single
|
||||||
trigger:
|
trigger:
|
||||||
- platform: time
|
- platform: calendar
|
||||||
at: '23:25'
|
event: start
|
||||||
- platform: time
|
offset: '-9:35:0'
|
||||||
at: '23:55'
|
entity_id: calendar.automations_wakeup
|
||||||
|
- platform: calendar
|
||||||
|
event: start
|
||||||
|
offset: '-9:05:0'
|
||||||
|
entity_id: calendar.automations_wakeup
|
||||||
condition:
|
condition:
|
||||||
- condition: time
|
- condition: time
|
||||||
weekday:
|
weekday:
|
||||||
@ -53,69 +57,15 @@
|
|||||||
- service: light.turn_off
|
- service: light.turn_off
|
||||||
target:
|
target:
|
||||||
entity_id: light.office_light_up
|
entity_id: light.office_light_up
|
||||||
mode: single
|
|
||||||
|
|
||||||
- id: goto_sleep-2
|
- id: goto_sleep_2
|
||||||
alias: '[Behaviour] Go to sleep 2 (next day)'
|
alias: '[Behaviour] Go to sleep (hard cutoff)'
|
||||||
description: ''
|
|
||||||
trigger:
|
|
||||||
- platform: time
|
|
||||||
at: '0:25'
|
|
||||||
condition:
|
|
||||||
- condition: time
|
|
||||||
weekday:
|
|
||||||
- mon
|
|
||||||
- tue
|
|
||||||
- wed
|
|
||||||
- thu
|
|
||||||
- fri
|
|
||||||
- condition: state
|
|
||||||
entity_id: binary_sensor.hulk_ping
|
|
||||||
state: 'on'
|
|
||||||
action:
|
|
||||||
- service: light.turn_on
|
|
||||||
data:
|
|
||||||
flash: long
|
|
||||||
rgb_color:
|
|
||||||
- 255
|
|
||||||
- 0
|
|
||||||
- 0
|
|
||||||
target:
|
|
||||||
entity_id: light.office_light_up
|
|
||||||
- delay: '0:05:00'
|
|
||||||
- choose:
|
|
||||||
- conditions:
|
|
||||||
- condition: state
|
|
||||||
entity_id: binary_sensor.hulk_ping
|
|
||||||
state: 'on'
|
|
||||||
- condition: state
|
|
||||||
entity_id: input_boolean.pc_caffeine
|
|
||||||
state: 'off'
|
|
||||||
sequence:
|
|
||||||
- service: shell_command.pc_poweroff
|
|
||||||
- choose:
|
|
||||||
- conditions:
|
|
||||||
- condition: state
|
|
||||||
entity_id: binary_sensor.hulk_ping
|
|
||||||
state: 'on'
|
|
||||||
- condition: state
|
|
||||||
entity_id: input_boolean.pc_caffeine
|
|
||||||
state: 'on'
|
|
||||||
sequence:
|
|
||||||
- service: input_boolean.turn_off
|
|
||||||
target:
|
|
||||||
entity_id: input_boolean.pc_caffeine
|
|
||||||
- service: light.turn_off
|
|
||||||
target:
|
|
||||||
entity_id: light.office_light_up
|
|
||||||
mode: single
|
mode: single
|
||||||
|
|
||||||
- id: goto_sleep-
|
|
||||||
alias: '[Behaviour] Go to sleep 3 (hard cutoff)'
|
|
||||||
description: ''
|
|
||||||
trigger:
|
trigger:
|
||||||
- platform: time
|
- platform: calendar
|
||||||
at: '0:55'
|
event: start
|
||||||
|
offset: '-8:35:0'
|
||||||
|
entity_id: calendar.automations_wakeup
|
||||||
condition:
|
condition:
|
||||||
- condition: time
|
- condition: time
|
||||||
weekday:
|
weekday:
|
||||||
@ -157,4 +107,3 @@
|
|||||||
- service: switch.turn_off
|
- service: switch.turn_off
|
||||||
target:
|
target:
|
||||||
entity_id: switch.computer_outlet
|
entity_id: switch.computer_outlet
|
||||||
mode: single
|
|
||||||
|
Loading…
Reference in New Issue
Block a user