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 - id: goto_sleep
alias: '[Behaviour] Go to sleep' alias: '[Behaviour] Go to sleep'
mode: single mode: single
@ -28,6 +44,11 @@
data: data:
title: "Sleep notifier" title: "Sleep notifier"
message: "Go to sleep, computer will turn off in 5 minutes" 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' - delay: '0:05:00'
- choose: - choose:
- conditions: - conditions:
@ -58,6 +79,17 @@
- service: input_boolean.turn_off - service: input_boolean.turn_off
target: target:
entity_id: input_boolean.pc_caffeine 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 - service: light.turn_off
target: target:
entity_id: light.office_light_up entity_id: light.office_light_up
@ -88,6 +120,11 @@
- 0 - 0
target: target:
entity_id: light.office_light_up 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 - service: light.turn_on
data: data:
rgb_color: rgb_color:

View File

@ -77,7 +77,7 @@
mode: single mode: single
- id: work_daily_minus_30m - id: work_daily_minus_30m
alias: '[Work] Daily 30m' alias: '[Work] Daily -30m'
trigger: trigger:
- platform: time - platform: time
at: '10:30' at: '10:30'
@ -98,7 +98,7 @@
entity_id: light.notification_cube_light entity_id: light.notification_cube_light
- id: work_daily_minus_15m - id: work_daily_minus_15m
alias: '[Work] Daily 15m' alias: '[Work] Daily -15m'
trigger: trigger:
- platform: time - platform: time
at: '10:45' at: '10:45'
@ -119,7 +119,7 @@
entity_id: light.notification_cube_light entity_id: light.notification_cube_light
- id: work_daily_minus_5m - id: work_daily_minus_5m
alias: '[Work] Daily 5m' alias: '[Work] Daily -5m'
trigger: trigger:
- platform: time - platform: time
at: '10:55' at: '10:55'
@ -162,7 +162,7 @@
alias: '[Work] Daily end' alias: '[Work] Daily end'
trigger: trigger:
- platform: time - platform: time
at: '10:30' at: '11:30'
condition: condition:
- condition: time - condition: time
weekday: weekday:
@ -198,24 +198,6 @@
entity_id: light.notification_cube_light entity_id: light.notification_cube_light
mode: single 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 - id: work_cool_down_home
alias: '[Work] Cool down home after leaving work' alias: '[Work] Cool down home after leaving work'
mode: single mode: single