1
0

Add sleep notifications for cube

This commit is contained in:
Przemek Grondek 2023-08-28 23:04:16 +02:00
parent c1673e4e53
commit ce2c151ae9
2 changed files with 41 additions and 22 deletions

View File

@ -1,3 +1,19 @@
- id: behaviour_pc_caffeine
alias: '[Behaviour] PC caffeine'
mode: single
trigger:
- platform: state
entity_id:
- input_boolean.pc_caffeine
to: "on"
condition: [ ]
action:
- service: light.turn_on
data:
color_name: green
target:
entity_id: light.notification_cube_light
- id: goto_sleep
alias: '[Behaviour] Go to sleep'
mode: single
@ -28,6 +44,11 @@
data:
title: "Sleep notifier"
message: "Go to sleep, computer will turn off in 5 minutes"
- service: light.turn_on
data:
color_name: orange
target:
entity_id: light.notification_cube_light
- delay: '0:05:00'
- choose:
- conditions:
@ -58,6 +79,17 @@
- service: input_boolean.turn_off
target:
entity_id: input_boolean.pc_caffeine
- choose:
- conditions:
- condition: state
entity_id: input_boolean.pc_caffeine
state: 'off'
sequence:
- service: light.turn_on
data:
color_name: yellow
target:
entity_id: light.notification_cube_light
- service: light.turn_off
target:
entity_id: light.office_light_up
@ -88,6 +120,11 @@
- 0
target:
entity_id: light.office_light_up
- service: light.turn_on
data:
color_name: red
target:
entity_id: light.notification_cube_light
- service: light.turn_on
data:
rgb_color:

View File

@ -77,7 +77,7 @@
mode: single
- id: work_daily_minus_30m
alias: '[Work] Daily 30m'
alias: '[Work] Daily -30m'
trigger:
- platform: time
at: '10:30'
@ -98,7 +98,7 @@
entity_id: light.notification_cube_light
- id: work_daily_minus_15m
alias: '[Work] Daily 15m'
alias: '[Work] Daily -15m'
trigger:
- platform: time
at: '10:45'
@ -119,7 +119,7 @@
entity_id: light.notification_cube_light
- id: work_daily_minus_5m
alias: '[Work] Daily 5m'
alias: '[Work] Daily -5m'
trigger:
- platform: time
at: '10:55'
@ -162,7 +162,7 @@
alias: '[Work] Daily end'
trigger:
- platform: time
at: '10:30'
at: '11:30'
condition:
- condition: time
weekday:
@ -198,24 +198,6 @@
entity_id: light.notification_cube_light
mode: single
- id: work_daily_off
alias: '[Work] Daily notification off'
trigger:
- platform: time
at: '10:00'
condition:
- condition: time
weekday:
- mon
- tue
- wed
- thu
- fri
action:
- service: light.turn_off
entity_id: light.notification_cube_light
mode: single
- id: work_cool_down_home
alias: '[Work] Cool down home after leaving work'
mode: single