From a8df96a1d69765795ac30c078d5d7cf57504233c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Grondek?= Date: Wed, 4 Oct 2023 23:48:17 +0200 Subject: [PATCH] Add meal automations --- configuration/alert.yaml | 11 +++++ configuration/automations/kitchen-meals.yaml | 46 ++++++++++++++++++++ configuration/configuration.yaml | 6 +++ scripts/10.modes.yaml | 8 ++++ 4 files changed, 71 insertions(+) create mode 100644 configuration/automations/kitchen-meals.yaml diff --git a/configuration/alert.yaml b/configuration/alert.yaml index c7771d3..5937fc2 100644 --- a/configuration/alert.yaml +++ b/configuration/alert.yaml @@ -1,3 +1,14 @@ +meal_alert: + name: It's time to eat a meal + done_message: Remmeber to eat on time + entity_id: input_boolean.meal_alert + state: 'on' + repeat: 15 + message: Remember to eat on time + notifiers: + - mobile_app_iphone + - hulk + washing_machine: name: Washing machine is done done_message: Laundry taken out diff --git a/configuration/automations/kitchen-meals.yaml b/configuration/automations/kitchen-meals.yaml new file mode 100644 index 0000000..068562e --- /dev/null +++ b/configuration/automations/kitchen-meals.yaml @@ -0,0 +1,46 @@ +- id: kitchen_meals_start + alias: '[Kitchen] Meal alert start' + mode: single + trigger: + - platform: state + entity_id: input_boolean.meal_helper + to: "on" + for: + hours: 3 + condition: + - condition: state + entity_id: input_select.home_mode + state: Home + action: + - service: input_boolean.turn_on + target: + entity_id: input_boolean.meal_alert + - service: input_boolean.turn_off + target: + entity_id: input_boolean.meal_helper + +- id: kitchen_meals_eaten + alias: '[Kitchen] Meal eaten' + mode: single + trigger: + - device_id: c0e0b405854000dcaa538cd0f3fc11de + domain: zha + platform: device + type: remote_button_short_press + subtype: remote_button_short_press + - platform: state + entity_id: input_boolean.meal_helper + to: "on" + for: + hours: 3 + condition: + - condition: state + entity_id: input_select.home_mode + state: Home + action: + - service: input_boolean.turn_on + target: + entity_id: input_boolean.meal_helper + - service: input_boolean.turn_off + target: + entity_id: input_boolean.meal_alert diff --git a/configuration/configuration.yaml b/configuration/configuration.yaml index d3b7ccc..8af409e 100644 --- a/configuration/configuration.yaml +++ b/configuration/configuration.yaml @@ -34,6 +34,12 @@ input_boolean: intercom_button: name: "Intercom button helper" icon: "mdi:door-closed-lock" + meal_alert: + name: "Meal alert" + icon: "mdi:silverware-fork-knife" + meal_helper: + name: "Meal helper" + icon: "mdi:silverware-fork-knife" pc_caffeine: name: "PC Caffeine" icon: "mdi:desktop-tower-monitor" diff --git a/scripts/10.modes.yaml b/scripts/10.modes.yaml index bdf7ea1..241c107 100644 --- a/scripts/10.modes.yaml +++ b/scripts/10.modes.yaml @@ -1,6 +1,11 @@ good_night: alias: Good Night sequence: + - service: input_boolean.turn_off + target: + entity_id: + - input_boolean.meal_helper + - input_boolean.meal_alert - service: input_select.select_option data: option: Night @@ -98,6 +103,9 @@ before_wakeup: good_morning: alias: Good Morning sequence: + - service: input_boolean.turn_on + target: + entity_id: input_boolean.meal_alert - service: input_boolean.turn_off target: entity_id: input_boolean.daily_coffee