1
0

Add some desktop notifications

This commit is contained in:
Przemek Grondek 2023-05-30 23:25:31 +02:00
parent d3dc08be5d
commit b2b125d485

View File

@ -24,6 +24,10 @@
- 0 - 0
target: target:
entity_id: light.office_light_up entity_id: light.office_light_up
- service: notify.hulk
data:
title: "Sleep notifier"
message: "Go to sleep, computer will turn off in 5 minutes"
- delay: '0:05:00' - delay: '0:05:00'
- choose: - choose:
- conditions: - conditions:
@ -34,6 +38,9 @@
entity_id: input_boolean.pc_caffeine entity_id: input_boolean.pc_caffeine
state: 'off' state: 'off'
sequence: sequence:
- service: light.turn_on
target:
entity_id: light.office_light_up
- service: shell_command.pc_poweroff - service: shell_command.pc_poweroff
- choose: - choose:
- conditions: - conditions:
@ -44,6 +51,10 @@
entity_id: input_boolean.pc_caffeine entity_id: input_boolean.pc_caffeine
state: 'on' state: 'on'
sequence: sequence:
- service: notify.hulk
data:
title: "Sleep notifier"
message: "You have 30 more minutes"
- service: input_boolean.turn_off - service: input_boolean.turn_off
target: target:
entity_id: input_boolean.pc_caffeine entity_id: input_boolean.pc_caffeine
@ -64,6 +75,10 @@
entity_id: binary_sensor.hulk_ping entity_id: binary_sensor.hulk_ping
state: 'on' state: 'on'
action: action:
- service: notify.hulk
data:
title: "Sleep notifier"
message: "Go to sleep, computer will be force turned off off in 5 minutes"
- service: light.turn_on - service: light.turn_on
data: data:
flash: long flash: long
@ -80,8 +95,18 @@
- 0 - 0
- 0 - 0
target: target:
entity_id: light.office entity_id: light.office_light_up
- delay: '0:05:00' - delay: '0:04:30'
- service: notify.hulk
data:
title: "Sleep notifier"
message: "30 seconds"
- delay: '0:00:20'
- service: notify.hulk
data:
title: "Sleep notifier"
message: "10 seconds"
- delay: '0:00:10'
- service: shell_command.pc_poweroff - service: shell_command.pc_poweroff
- service: input_boolean.turn_off - service: input_boolean.turn_off
target: target: