Add automation to go to sleep
This commit is contained in:
parent
0184cd2ce6
commit
6db32045fd
31
automations/files/goto-sleep.yaml
Normal file
31
automations/files/goto-sleep.yaml
Normal file
@ -0,0 +1,31 @@
|
||||
- id: goto_sleep
|
||||
alias: Go to sleep
|
||||
description: ''
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '23:55'
|
||||
condition:
|
||||
- condition: time
|
||||
weekday:
|
||||
- mon
|
||||
- tue
|
||||
- wed
|
||||
- thu
|
||||
- sun
|
||||
- condition: state
|
||||
entity_id: binary_sensor.desktop
|
||||
state: 'on'
|
||||
action:
|
||||
- service: light.turn_on
|
||||
data:
|
||||
brightness: 200
|
||||
rgb_color:
|
||||
- 255
|
||||
- 0
|
||||
- 0
|
||||
entity_id:
|
||||
- light.computer_left
|
||||
- light.computer_right
|
||||
- delay: '0:05:00'
|
||||
- service: shell_command.poweroff_pc
|
||||
mode: single
|
Loading…
Reference in New Issue
Block a user