From b2b125d485f774e451568ec8fbe19448ff16f047 Mon Sep 17 00:00:00 2001 From: Przemek Grondek Date: Tue, 30 May 2023 23:25:31 +0200 Subject: [PATCH] Add some desktop notifications --- .../automations/behaviour-goto-sleep.yaml | 29 +++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/configuration/automations/behaviour-goto-sleep.yaml b/configuration/automations/behaviour-goto-sleep.yaml index 3544718..e70c2cf 100644 --- a/configuration/automations/behaviour-goto-sleep.yaml +++ b/configuration/automations/behaviour-goto-sleep.yaml @@ -24,6 +24,10 @@ - 0 target: 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' - choose: - conditions: @@ -34,6 +38,9 @@ entity_id: input_boolean.pc_caffeine state: 'off' sequence: + - service: light.turn_on + target: + entity_id: light.office_light_up - service: shell_command.pc_poweroff - choose: - conditions: @@ -44,6 +51,10 @@ entity_id: input_boolean.pc_caffeine state: 'on' sequence: + - service: notify.hulk + data: + title: "Sleep notifier" + message: "You have 30 more minutes" - service: input_boolean.turn_off target: entity_id: input_boolean.pc_caffeine @@ -64,6 +75,10 @@ entity_id: binary_sensor.hulk_ping state: 'on' 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 data: flash: long @@ -80,8 +95,18 @@ - 0 - 0 target: - entity_id: light.office - - delay: '0:05:00' + entity_id: light.office_light_up + - 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: input_boolean.turn_off target: