#Triggering Button Entity with Notification Action

1 messages · Page 1 of 1 (latest)

obsidian moss
#

I'm using an automation to trigger this notification action when entering a zone. That all works correctly and the notification appears with "Yes"/"No" options.
However, pressing the "Yes" option does not trigger the button as I would expect it to. Am I formatting it wrong? I'm not spotting any errors. But there's likely something missing. (A couple of details mildly redacted so as not to give out my name/mac address)

action: notify.mobile_app__phone
metadata: {}
data:
  message: Would you like to turn your computer on?
  title: Computer
  data:
    actions:
      - action: START
        title: "Yes"
        uri: entityId:button.wake_on_lan_mac_address
      - action: STOP
        title: "No"
river latch
#

That's not supposed to "push" the button. It should bring up the "More info" of an entity on Android only (but seems broken to me...). If you want to react to the button press, set up an automation that listens to that event.

obsidian moss
#

and if I can have a separate device that is affected, how do I avoid a uri for that which simply is just bringing up "More Info" on that (and failing)

#

The overall automation is:
When my phone enters home
If Computer is disconnected
Send notification to phone, offering (but not doing so regardless) to turn it on.

#

Everything up to the "Yes" action actually triggering the turn on is working. I can confirm the button.wake_on_lan certainly works from the dashboard.

river latch
#

No, the uri will not change any entity, that's not a capability. Pushing the button will fire an event in HA which you can use as a trigger.

  - event_type: mobile_app_notification_action
    event_data:
      action: LightOff
    context: {}
    trigger: event

Where the action is what you used as action for the button so make it unique.

obsidian moss
#

Looks like it works.

actions:
  - action: WakeMyPC
    title: "Yes"
  - action: Cancel
    title: "No"

And then just a separate automation listening for the mobile_app_notification_Action with listening for "WakeMyPC"

#

Seems to trigger correctly

#

Much appreciated!