Not getting actionable button in push notificaiton

Hi all

I am trying to setup an automation to send me a push notification reminder at night that will allow me to Arm my alarm system
I’ve tried different variations but I cannot get the notification to actually show the button to Arm Home

This is my config (removed triggers and condition just for testing):

alias: Push - Reminder to Arm Home
description: ''
trigger: []
condition: []
action:
  - service: notify.notify
    data:
      message: Alarm System has not been armed.
      title: Frontpoint
      data:
        actions:
          - action: null
            service: alarm_control_panel.alarm_arm_home
            target:
              entity_id: alarm_control_panel.panel
            title: Arm Home
mode: single

Ive also tried:

actions:
  - service: alarm_control_panel.alarm_arm_home
    target:
      entity_id: alarm_control_panel.panel
    title: Arm Home

I get the push, but no actionable button for me to press.

Any ideas?

Have you looked at the example here:

I have, and ti seems I may have to use a variable under the action to get this to work.
I’m confused on how I can setup a variable with a specific service call not relying on a trigger or sequence.
Is that correct or can I statically define the service to call under the action using a variable?

This works for me when my coffee maker turns off.

alias: Notification - Coffeemaker Turned Off
description: ''
trigger:
  - platform: state
    entity_id:
      - switch.coffee_maker_start_pause
    from: 'on'
    to: 'off'
condition:
  - condition: device
    type: is_off
    device_id: xxxxxxx
    entity_id: switch.coffee_maker_start_pause
    domain: switch
action:
  - service: notify.mobile_app_pixel_4a_5g_tim
    data:
      message: The coffeemaker has turned off and is cooling down!
      title: Coffeemaker Status
      data:
        ttl: 0
        priority: high
        actions:
          - action: turn_on_coffeemaker
            title: Turn on Coffeemaker
mode: single

And here is my notification action handler automation:

alias: Notification Action - Turn on Coffeemaker
description: ''
trigger:
  - platform: event
    event_data:
      action: turn_on_coffeemaker
    event_type: mobile_app_notification_action
condition: []
action:
  - type: turn_on
    device_id: xxxxx
    entity_id: switch.coffee_maker_start_pause
    domain: switch
mode: single

@jaimmor to be clear you need an action in the first automation that sends the notification. Then you need an automation that handles the button action as a trigger.

You could combine these into 1 automation with two triggers and leveraging a condition on trigger IDs. The key is that the notification and the action are 2 different things. You can’t have the notification actually trigger the thing you want to have happen.

Hi! Thanks for your reply!

So I would like to just use 1 automation to help keep things neat

In my example, I do have two different actions for this, 1 for the notification, and another for when a user presses the ‘button’ within the notification.
I’ve seen examples getting this to work but my issue is that the action I need performed when the button is pressed is a service, rather than an action such as light.turn_off

At least thats what I think
If I cant get that to work Ill do two automations and see if I can get that to work

I found a YT video that I think goes over what you mentioned in the second paragraph of your reply
Im going to try that out but it seems like that’ll do what I want it to

YT Vid: Home Assistant Actionable Notifications on iOS AND Android - YouTube

@jaimmor so all automations have Triggers->Conditions->Actions, so it’s that flow I’m referring to when I say “action” whereas in your case the “action” would be to call a service. I decided to do myself a favor and I combined them into 1 automation. Here is the single automation:

alias: Coffeemaker Manager
description: ""
trigger:
  - platform: state
    entity_id:
      - switch.coffee_maker_start_pause
    from: "on"
    to: "off"
    id: coffee-maker-off
  - platform: event
    event_data:
      action: turn_on_coffeemaker
    event_type: mobile_app_notification_action
    id: coffee-maker-action
condition:
  - condition: device
    type: is_off
    device_id: xxxx
    entity_id: switch.coffee_maker_start_pause
    domain: switch
action:
  - choose:
      - conditions:
          - condition: trigger
            id: coffee-maker-off
        sequence:
          - service: notify.mobile_app_pixel_4a_5g_tim
            data:
              message: The coffeemaker has turned off and is cooling down!
              title: Coffeemaker Status
              data:
                ttl: 0
                priority: high
                actions:
                  - action: turn_on_coffeemaker
                    title: Turn on Coffeemaker
      - conditions:
          - condition: trigger
            id: coffee-maker-action
        sequence:
          - type: turn_on
            device_id: xxxx
            entity_id: switch.coffee_maker_start_pause
            domain: switch
    default: []
mode: single
1 Like

Got it to work that way, that YT video helped simplify it as well. Thank you for your guidance on this!

Hi,
So I took your logic and tried to apply it to my garage door notification for when somebody opens the garage door. I just want a button to close it again.
Would you mind telling where I lost the plot on this one please?

alias: "!WIP Garage Open"
description: ""
trigger:
  - platform: state
    entity_id:
      - cover.remootio_device_host_192_168_8_59_s_n_246f2825fc68xemkltur_none
    to: open
    for:
      hours: 0
      minutes: 0
      seconds: 0
    id: garage-open
  - platform: event
    event_data:
      action: open_garage
    event_type: mobile_app_notification_action
    id: open-garage-action
action:
  - choose:
      - conditions:
          - condition: trigger
            id: garage-open
        sequence:
          - service: notify.mobile_app_mark_s_fold4
            data:
              message: The garage is OPEN!!!
              title: Alert
              data:
                ttl: 0
                priority: high
                actions:
                  - action: close_garage
                    title: Close Garage
      - conditions:
          - condition: trigger
            id: close-garage-action
        sequence:
          - type: cover.close_cover
            entity_id: >-
              cover.remootio_device_host_192_168_8_59_s_n_246f2825fc68xemkltur_none
            domain: switch
    default: []
mode: single

@Mark.sydney your condition id is open-garage-action but in your action conditional you are triggering off of the close-garage-action id which doesn’t exist. Your action conditional should be triggering off of the open-garage-action id.