From 766b2ded46c0672124f0f2b5859a3a9eec24e18b Mon Sep 17 00:00:00 2001 From: Patrick Walker Date: Wed, 30 Apr 2025 18:22:59 -0400 Subject: [PATCH 1/4] Update trigger syntax --- .../to-do_chore_notifications.yaml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/automations/to-do_chore_notifications/to-do_chore_notifications.yaml b/automations/to-do_chore_notifications/to-do_chore_notifications.yaml index 3f9fbd4..48fe1f6 100644 --- a/automations/to-do_chore_notifications/to-do_chore_notifications.yaml +++ b/automations/to-do_chore_notifications/to-do_chore_notifications.yaml @@ -43,15 +43,18 @@ blueprint: description: Select the To-do list you want to create Chore notifications from. selector: entity: - domain: todo + multiple: false + filter: + domain: todo input_notify_devices: name: Mobile App Devices to Notify description: What mobile_app devices do you want to receive the notifications? default: [] selector: device: - integration: mobile_app multiple: true + filter: + - integration: mobile_app section_advanced_notification: name: Advanced Notification Options description: More advanced options that add complexity and flexibility for less typical setups. @@ -118,15 +121,15 @@ variables: list_check_frequency: !input input_list_check_frequency trigger_variables: list_check_frequency: !input input_list_check_frequency -trigger: - - platform: time +triggers: + - trigger: time at: !input input_notification_time id: Notify - - platform: template + - trigger: template id: TimeNotify value_template: "{{ now().minute % list_check_frequency == 0 }}" enabled: !input input_use_todo_time - - platform: event + - trigger: event event_type: mobile_app_notification_action id: Mark event_data: {} From 5775c0d00a6a5123e6db13a1dabd92c5634695ad Mon Sep 17 00:00:00 2001 From: Patrick Walker Date: Wed, 30 Apr 2025 18:23:47 -0400 Subject: [PATCH 2/4] Update service syntax (replace with action) --- .../to-do_chore_notifications.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/automations/to-do_chore_notifications/to-do_chore_notifications.yaml b/automations/to-do_chore_notifications/to-do_chore_notifications.yaml index 48fe1f6..49eea36 100644 --- a/automations/to-do_chore_notifications/to-do_chore_notifications.yaml +++ b/automations/to-do_chore_notifications/to-do_chore_notifications.yaml @@ -145,7 +145,7 @@ action: entity_id: !input input_todo_list above: 0 sequence: - - service: todo.get_items + - action: todo.get_items metadata: {} data: status: needs_action @@ -212,7 +212,7 @@ action: repeat: for_each: "{{ notify_action_full_names }}" sequence: - - service: "{{ repeat.item }}" + - action: "{{ repeat.item }}" data: title: | {{ 'Chore - ' ~ chore.summary }} @@ -254,7 +254,7 @@ action: {% else %} {{ trigger.event.data.tag }} {% endif %} - - service: todo.update_item + - action: todo.update_item metadata: {} data: item: "{{ todo_item }}" @@ -265,7 +265,7 @@ action: repeat: for_each: "{{ notify_action_full_names }}" sequence: - - service: "{{ repeat.item }}" + - action: "{{ repeat.item }}" data: message: clear_notification data: From 105b0a609392244d0b91e1d20a365a45122d5bea Mon Sep 17 00:00:00 2001 From: Patrick Walker Date: Thu, 1 May 2025 10:00:55 -0400 Subject: [PATCH 3/4] Add default step value --- .../to-do_chore_notifications/to-do_chore_notifications.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/automations/to-do_chore_notifications/to-do_chore_notifications.yaml b/automations/to-do_chore_notifications/to-do_chore_notifications.yaml index 49eea36..10af0a8 100644 --- a/automations/to-do_chore_notifications/to-do_chore_notifications.yaml +++ b/automations/to-do_chore_notifications/to-do_chore_notifications.yaml @@ -219,6 +219,10 @@ action: message: > {{ chore.description | default('You have a chore to complete!') }} data: + # url for ios, clickAction for Android + # https://companion.home-assistant.io/docs/notifications/notifications-basic/#opening-a-url + url: "{{ 'homeassistant://navigate/todo?entity_id=' ~ selected_todo_list }}" + clickAction: "{{ 'homeassistant://navigate/todo?entity_id=' ~ selected_todo_list }}" actions: - action: "{{ selected_todo_list ~ ' ' ~ chore.uid }}" title: Mark Done! From 9e1a5cb4abea78bc6259fe861b0f76235aaebd6a Mon Sep 17 00:00:00 2001 From: Patrick Walker Date: Thu, 1 May 2025 10:00:55 -0400 Subject: [PATCH 4/4] Add url and clickAction --- .../to-do_chore_notifications/to-do_chore_notifications.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/automations/to-do_chore_notifications/to-do_chore_notifications.yaml b/automations/to-do_chore_notifications/to-do_chore_notifications.yaml index 49eea36..10af0a8 100644 --- a/automations/to-do_chore_notifications/to-do_chore_notifications.yaml +++ b/automations/to-do_chore_notifications/to-do_chore_notifications.yaml @@ -219,6 +219,10 @@ action: message: > {{ chore.description | default('You have a chore to complete!') }} data: + # url for ios, clickAction for Android + # https://companion.home-assistant.io/docs/notifications/notifications-basic/#opening-a-url + url: "{{ 'homeassistant://navigate/todo?entity_id=' ~ selected_todo_list }}" + clickAction: "{{ 'homeassistant://navigate/todo?entity_id=' ~ selected_todo_list }}" actions: - action: "{{ selected_todo_list ~ ' ' ~ chore.uid }}" title: Mark Done!