From 16150b31eb8eeeaf705990636ec980ab1b1408b9 Mon Sep 17 00:00:00 2001 From: Przemek Grondek Date: Sun, 27 Aug 2023 23:50:04 +0200 Subject: [PATCH] Add notifcation cube for work --- configuration/automations/work.yaml | 186 +++++++++++++++++++++------- scripts/10.modes.yaml | 2 + 2 files changed, 146 insertions(+), 42 deletions(-) diff --git a/configuration/automations/work.yaml b/configuration/automations/work.yaml index dcb794c..2fe3803 100644 --- a/configuration/automations/work.yaml +++ b/configuration/automations/work.yaml @@ -55,6 +55,149 @@ entity_id: light.bathroom_color_zha_group_0x0007 mode: single +- id: work_start + alias: '[Work] Start' + trigger: + - platform: time + at: '10:00' + condition: + - condition: time + weekday: + - mon + - tue + - wed + - thu + - fri + action: + - service: light.turn_on + data: + color_name: green + target: + entity_id: light.notification_cube_light + mode: single + +- id: work_daily_minus_30m + alias: '[Work] Daily 30m' + trigger: + - platform: time + at: '10:30' + condition: + - condition: time + weekday: + - mon + - tue + - wed + - thu + - fri + action: + - service: light.turn_on + data: + color_name: yellow + transition: 2 + target: + entity_id: light.notification_cube_light + +- id: work_daily_minus_15m + alias: '[Work] Daily 15m' + trigger: + - platform: time + at: '10:45' + condition: + - condition: time + weekday: + - mon + - tue + - wed + - thu + - fri + action: + - service: light.turn_on + data: + color_name: orange + transition: 2 + target: + entity_id: light.notification_cube_light + +- id: work_daily_minus_5m + alias: '[Work] Daily 5m' + trigger: + - platform: time + at: '10:55' + condition: + - condition: time + weekday: + - mon + - tue + - wed + - thu + - fri + action: + - service: light.turn_on + data: + color_name: purple + target: + entity_id: light.notification_cube_light + +- id: work_daily_start + alias: '[Work] Daily' + trigger: + - platform: time + at: '11:00' + condition: + - condition: time + weekday: + - mon + - tue + - wed + - thu + - fri + action: + - service: light.turn_on + data: + color_name: red + target: + entity_id: light.notification_cube_light + +- id: work_dailY_end + alias: '[Work] Daily end' + trigger: + - platform: time + at: '10:30' + condition: + - condition: time + weekday: + - mon + - tue + - wed + - thu + - fri + action: + - service: light.turn_on + data: + color_name: green + target: + entity_id: light.notification_cube_light + mode: single + +- id: work_end + alias: '[Work] End' + trigger: + - platform: time + at: '18:00' + condition: + - condition: time + weekday: + - mon + - tue + - wed + - thu + - fri + action: + - service: light.turn_off + target: + entity_id: light.notification_cube_light + mode: single + - id: work_daily_off alias: '[Work] Daily notification off' trigger: @@ -70,48 +213,7 @@ - fri action: - service: light.turn_off - entity_id: light.desk_lightbar_ambilight - mode: single - -- id: work_finished - alias: '[Work] Notify when finished work' - trigger: - - platform: state - entity_id: device_tracker.amdn4684 - for: - hours: 8 - to: home - condition: - - condition: time - weekday: - - mon - - tue - - wed - - thu - - fri - action: - - service: script.vacuum_today - - service: light.turn_on - data: - brightness_pct: 100 - rgb_color: - - 0 - - 200 - - 83 - entity_id: light.office_light_up - - service: light.turn_on - data: - flash: long - brightness_pct: 100 - rgb_color: - - 0 - - 200 - - 83 - entity_id: light.office_light_up - - delay: - minutes: 5 - - service: light.turn_off - entity_id: light.office_light_up + entity_id: light.notification_cube_light mode: single - id: work_cool_down_home diff --git a/scripts/10.modes.yaml b/scripts/10.modes.yaml index bf7d064..bdf7ea1 100644 --- a/scripts/10.modes.yaml +++ b/scripts/10.modes.yaml @@ -80,6 +80,7 @@ good_night: - light.balcony - light.table_lamp_lights - light.lego_bookcase_light + - light.notification_cube_light mode: single icon: mdi:weather-night @@ -228,6 +229,7 @@ leave_home: - light.balcony - light.table_lamp_lights - light.lego_bookcase_light + - light.notification_cube_light mode: single icon: mdi:home-export-outline