From c8f82199910cf597bf5e6a4e70771c6a6e26faf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Grondek?= Date: Sun, 31 Mar 2024 00:13:47 +0100 Subject: [PATCH] Add option to mark meal eaten from notification --- configuration/alert.yaml | 5 ++++- configuration/automations/mobile-actions.yaml | 19 ++++++++++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/configuration/alert.yaml b/configuration/alert.yaml index ba623a4..be4549e 100644 --- a/configuration/alert.yaml +++ b/configuration/alert.yaml @@ -7,7 +7,10 @@ meal_alert: repeat: 15 notifiers: - mobile_app_iphone - - hulk + data: + actions: + - action: MEAL_EATEN + title: "Mark meal as eaten" washing_machine: name: Washing machine is done diff --git a/configuration/automations/mobile-actions.yaml b/configuration/automations/mobile-actions.yaml index 9f55edb..500fe43 100644 --- a/configuration/automations/mobile-actions.yaml +++ b/configuration/automations/mobile-actions.yaml @@ -51,7 +51,7 @@ - service: script.arrive_home - id: mobile_action-clothes_put_away - alias: '[Mobile-action] Clothes puth away' + alias: '[Mobile-action] Clothes put away' description: '' mode: single trigger: @@ -63,3 +63,20 @@ - service: input_boolean.turn_off target: entity_id: input_boolean.washing_clothes_dry + +- id: mobile_action-meal_eaten + alias: '[Mobile-action] Meal eaten' + description: '' + mode: single + trigger: + - platform: event + event_type: mobile_app_notification_action + event_data: + action: MEAL_EATEN + 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