How to Use Android Actionable Notifications for Home Assistant: Getting Started

Sample Notification

I’m always looking for ways to make my Smart Home experience more interactive. I recently came across “Actionable Notifications“. In this post, I will show you how to use them to interact with “Home Assistant” from your Android devices.

Android Actionable Notifications

An actionable notification is an interactive “Push Notification”. For instance, Using Home Assistant, you can create custom notifications with “buttons” that can be selected on you smart device to interact with your home.

Now, I found very little information on how to set up actionable notifications for Android devices and I’m hoping the information helps you out.

Make sure that you’ve installed the Home Assistant Companion App from the Google Play Store and and have connected it to Home Assistant.

Using Home Assistant

In the Home Assistant web interface, select the “Services” tab under “Developer Tools”. Enter “notify.mobile_app_” and select the service corresponding to your android device. In the image below, the device name is “sm_g973u”.

Paste the “yaml” snippet below into the “Service Data” field, and then click on the “Call Service Button”.

message: This is a test message
data:
  actions:
  - action: action_1
    title: Action 1
  - action: action_2
    title: Action 2
  - action: action_3
    title: Action 3

If everything went well, the notification should appear on your device. If you don’t see the actions, try expanding the notification.

Using Node Red

We’ll start by setting up the following sequence in Node Red using a “Call Service” node.

Next, configure the “Call Service” node.

The most important configurations are the “Domain”, “Service” and data field.

Populate the “Data” field as follows:

{
    "message": "This is a test message",
    "data": {
        "actions": [
            {
                "action": "action_1",
                "title": "Action 1"
            },
            {
                "action": "action_2",
                "title": "Action 2"
            },
            {
                "action": "action_3",
                "title": "Action 3"
            }
        ]
    }
}

This is the same information as before, but now formatted in JSON.

Deploy and trigger the sequence to trigger an “Actionable Notification”.

Next Up

Leave a comment and let me know what you think. Part 2 of this series will show you how to something happen once an action is selected.


Leave a Reply

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