1
0
ansible-home-assistant/automations/files/goto-sleep.yaml

36 lines
701 B
YAML
Raw Normal View History

2020-11-16 23:55:05 +00:00
- id: goto_sleep
alias: Go to sleep
description: ''
trigger:
- platform: time
2020-11-21 03:28:38 +00:00
at: '23:25'
2020-11-16 23:55:05 +00:00
condition:
- condition: time
weekday:
- mon
- tue
- wed
- thu
- sun
- condition: state
entity_id: binary_sensor.desktop
state: 'on'
action:
- service: light.turn_on
data:
2020-11-16 23:57:58 +00:00
flash: long
2020-11-16 23:55:05 +00:00
brightness: 200
rgb_color:
- 255
- 0
- 0
entity_id:
- light.computer_left
- light.computer_right
- delay: '0:05:00'
2020-11-21 03:28:38 +00:00
- condition: state
entity_id: binary_sensor.desktop
state: 'on'
2020-11-16 23:55:05 +00:00
- service: shell_command.poweroff_pc
mode: single