Actionable notifications in Android app version 1.6.0

Does the android app work faster for you guys compared to the old way of viewing hass in a webpage? I feel it’s more sluggish, and I’m wondering if I’m not the only one.

Hi all,
i try actionable notification but it doesn’t work on my Huawei P20
I only get a notification with the title message and body, no action button!

message: This is a actionable notification test message!
title: Test notification
data:
  actions:
  - action: trigger_1
    title: T1
  - action: trigger_2
    title: T2
  - action: trigger_3
    title: T3
  - action: trigger_4
    title: T4

I have the same phone, did you click on the down arrow on the notification to show it all ?

There is no down arrow :frowning:
Only the title et the body

I’m using the development tools and called notify.mobile_app_eml_l29 service.
Home Assistant app v1.7.2-218

Strange, this is how my notificaiton comes in:

and this is how it looks after 2 taps of the arrow (next to “Just Now”):

and this is the automation:

- alias: Simon arrived home
  trigger:
    platform: zone
    entity_id: device_tracker.simon
    zone: zone.home
    event: enter
  action:
    service: notify.mobile_app_eml_l09
    data:
      message: Simon arrived home at {{now().strftime('%-I:%M %p')}}
      title: Home Automation
      data:
        actions:
          - action: unlock_front_door
            title: Unlock Front Door
        priority: high
        ttl: 0

You may need to start fresh with the android app if you can’t get actions to show up properly.

Android only supports up to 3 actions per notification as well

https://developer.android.com/training/notify-user/build-notification#Actions

Great thank you, it’s working with a refresh of the app.
It’s not very “easy” to use because action button are hide by Android ans if you click on the notification, it disappear and you can’t use action button anymore

You can force the notification to stay until dismissed using sticky: true this will prevent it from going away when you tap on it and you must swipe it away. The action buttons hiding are an android thing but you can do the pull down gesture on it to show the buttons.

2 Likes

Could you please show me the syntax to open a particular lovelace view in the Android Companion App from an actionable notification? I’m trying to do the same thing as you did: I have a separate lovelace view which displays images from my cameras. When motion is detected, I take snapshots and send a notification, with an Action called View. When pressing the View button, I want the companion app to open in the lovelace view showing the pictures.

like this :

my secret url is : https://xxx.ui.nabu.casa/lovelace/doorbell


  - service: !secret notify_ha_fabio
    data:
      title: "Deurbel"
      message: "Er staat iemand aan de deur!"
      data:
        actions:
          - action: "URI" 
            title: "Live view..."
            uri: !secret camera_url
        image: !secret snapshot_buiten_deurbel_webhook
        priority: high
        ttl: 0

Doesn’t this simply open the Lovelace page in a web browser? I’m trying to get the companion app to open in this view on my phone. Or am I missing something? Not sure what the ui.nabu.casa is, but I assume it is a dynamic dns service?

yes, indeed , it just opens it in a browser, not sure how i able to play a video otherwise
nabucasa, is the paid cloud service for HA? like the free duckdns service

@tbrausch and @pergola.fabio if you used a URL like /lovelace/view where view is the path you used for the view itself then the app will open to the specific view instead of the browser.

ahh! that s good, didnt know that :slight_smile:
Edit: tested and working!! Much better, now it’s within the app :wink:

1 Like

It should also work with clickAction

Thank you for the help, but I’m feeling a little out of my league right now (and still can’t seem to get it to work). You said if I used a URL like /lovelace/view where view is the path you used for the view itself it should work. When I open a view in the browser, the path is displayed as dnsaddress:8123/lovelace/2 , so should my actions section look like this:

          actions:
            - action: "URI"
              title: "View"
              uri: "/lovelace/2"

Or, using clickAction like this?

          clickAction: '/lovelace/2'

Neither seem to work.

Note: Now I understand, although it still doesn’t work. But I need to spend some more time testing. Thanks again to both of you.

This is the path I am referring to: https://www.home-assistant.io/lovelace/views/#path

Now I think I know what the problem is. I can get this to work IF the companion app is not already running on my phone. It will open to the correct tab. But if the app is already running (which it normally is), it simply brings the app to the forefront and leaves it displaying whichever lovelace tab was last opened. Do you see this same behavior?

1 Like

Its working for me when I use the actionable notification…doesnt seem to be loading the correct tab for clickAction

My problems appear to have been a caching problem on the phone (should know by now to check this). I am now getting the same results as you. It works for the actionable notification but not for clickAction. Thanks again for all your help.