How to Use Android Actionable Notifications for Home Assistant: Listening for Events

Right now selecting an action does nothing. Let’s change that.

If you hadn’t noticed, selecting an action causes the notification to disappear. Behind the scenes, an event transmits to Home Assistant with action information. Listening to the event is the first step in doing something with it.

In Home Assistant, select the “Events” tab from “Developers Tools”. Scroll all the way to the bottom of the page and locate the “Listen to events” pane.

In the “Event to subscribe to” enter “mobile_app_notification_action” to listen to events from the Android application. Finally, click “Start Listening”. Send the example notification to your phone and select an action to see the corresponding event.

In the example above, the “action” key indicates the selected action.

In my updated “Node Red” example, I added an “events: all” node.

I configured the node as follows:

I have a “debug node” on the output of the “events: all” node, with this I can see the event in the debug panel.

The “payload.event.action” key indicates which action was. In my next post, we’ll take it to the next level and start controlling things around the house.

1 Comment


Leave a Reply

Your email address will not be published. Required fields are marked *