Wait for a trigger in actionable notifications I can't make it work

Wait for a trigger never receives the replay from the phone (Iphone SE).
Could someone please tell me what I am doing wrong?
Thank you

1 Like

You may be using the wrong technique. Try this section of the Companion Docs: Actionable Notifications | Home Assistant Companion Docs. It’s a little more effort (which is probably necessary), but it has worked for me (on Android).

Oh, and once you’re done testing it, it might be a good idea to extend the timeout in case you don’t immediately see the notification or if the notification is delayed in transit for some reason.

It looks very simple but when i press “yes” in the phone it does not continue with the actions… does anybody have any examples ? maybe the syntax is incorrect …

This is how I am doing it. The only difference, you want to wait in an running automation but I am triggering a new instance of automation as the previous one would be completed. I am also not sure, if wait_for_trigger supports events, maybe someone more knowledgeable can chime in.

I use(d) the same. Stopped working for me too, will try the other suggestions in this thread.

Here’s the script I made for myself following the “Building notification action scripts” section that I linked earlier.

alias: Garage Left Open Notification 1
mode: single
sequence:
  - alias: Set up variables for the actions
    variables:
      action_close: "{{ 'CLOSE_' ~ context.id }}"
      action_dismiss: "{{ 'DISMISS_' ~ context.id}}"
  - alias: Alert that Garage Door 1 has been left open
    service: notify.mobile_app_wade
    data:
      title: MyQ
      message: Garage Door 1 has been left open at {{ now().strftime("%-I:%M %p") }}.
      data:
        ttl: 0
        priority: high
        tag: garage-left-open-1
        channel: Garages
        actions:
          - action: "{{ action_close }}"
            title: Close Garage
          - action: "{{ action_dismiss }}"
            title: Dismiss
  - alias: Wait for a response
    wait_for_trigger:
      - platform: event
        event_type: mobile_app_notification_action
        event_data:
          action: "{{ action_close }}"
      - platform: event
        event_type: mobile_app_notification_action
        event_data:
          action: "{{ action_dismiss }}"
    timeout:
      hours: 5
      minutes: 0
      seconds: 0
      milliseconds: 0
  - alias: Perform the action
    choose:
      - conditions: "{{ wait.trigger.event.data.action == action_close }}"
        sequence:
          - service: cover.close_cover
            target:
              entity_id: cover.garage_door_1
            data: {}
      - conditions: "{{ wait.trigger.event.data.action == action_dismiss }}"
        sequence:
          - service: script.clear_garage_left_open_notification
            data: {}

The difference is that it creates variables and uses template {{ }}.

I can confirm that it does work (at least when myQ isn’t broken), BUT (and it’s an annoyingly big but) I have been having some issues with the app recently which updating didn’t fix, and the script only worked today after I uninstalled and reinstalled the app. Now, I have to go through and set up all my widgets (which are now working as well, woohoo!) and redo my notification channels (what’s the rules on cursing here again?). If I’m lucky, though, maybe the app will actually be able to track my location this time (I won’t hold my breath).

Hopefully, re-installation isn’t actually necessary for other people, since I recently refreshed my Home Assistant with a new install, and it probably screwed with the connection with the app.

*** Solved *** I re-installed the app in the phone , delete it and installed again and it worked!
Thank you for the ideas !