🔔 Actionable notifications for Android

That did the trick. Works like I was expecting now.

Great job,thanks!

Found a typo in action_2uri:

update to

action_2_uri:
      name: URI for action 2 (Optional)
      description: Optional URI for the second action
      default: ""

really cool, thanks

I thought I’d mention in this thread, I used bits of this blueprint to make my own! Thanks for your awesome blueprint!

Hey, I’m looking at using your blueprint to notify on activity detected by a camera. Great job on that, thanks for sharing!
I changed the trigger to an input_text instead of an input_boolean, that works well. That input_text captured the message sent by the camera on detection. Do you know if there is a way to have that message as notification title? I’ve tried to use {{ trigger.to_state }} without success… removing the brackets doesn’t work either, template isn’t resolved…
Any help would be welcomed! cheers

I can’t help with your problem explicitly, but {{ trigger.to_state }} normally is {{ trigger.to_state.state }}. :slight_smile:

1 Like

It works! I love you so much :grin:

1 Like

Hi,

thanks for that blueprint. But can it be, that it will only work with the full version of the android app from PlayStore? I am using the version from F-Droid. This means also the normal notifications won’t work at all.

What I tried by now:

  1. create boolean helper
  2. create two automations
    2.1 just a test for turning the boolean on manually
    2.2 added the boolean, my device and app://net.programmierecke.radiodroid2

But in fact absolutelly nothing happens. So I assume I need to use the full version. If this is correct, can you mention that please in thr RTFM? Because this saves time for ppl who dont want to use gapps on their phones. But it would be nice to have such a feature also with the version from F-Droid
As for example the service “notify.mobile_app_” does not exist on the “light” version.
Ref: https://github.com/home-assistant/android/issues/1367

cheers
fb

That’s because the notifications for the companion app are using Google services to deliver these to your phone. Without the Google Play Framework, it is not possible to use the notifications in Android.

If you know a better way, let us know, I’d be very interested in avoiding these Google services… :slight_smile:

1 Like

it is in the companion documentation: Android Flavors | Home Assistant Companion Docs

and also mentioned on F-Droid: Home Assistant | F-Droid - Free and Open Source Android App Repository

hi,

so my question was answerd indirectly. Yes, the full version is needed as well. And yes, also just using the full version without gapps won’t lead to anywhere because google services are needed.

Well. I am not really a coder. But Signal and Telegram are also working without gapps. So maybe the same procedure would work here as well.

Jump over to the Android companion app thread and request the notifications on the frdoid app there. I will say, the developer has made it very clear he will not support alternative notifications though, unfortunately

We never said that, we said that we will accept PR’s on it and that a viable solution will still require a server setup based on what we have seen. We would love to move away from firebase but it requires a lot of changes and its not simple. Its going to require core changes as well. Firebase just makes life easier to implement which is why it exists today. The enhancement request on github was not closed either so not sure where you got it from that it wouldn’t be supported. We are also open source so anyone can come along and add submit a PR. Whatever we consider it will be benefit all users and not just the minimal version.

1 Like

Newbie question - to get actions to work, does the phone need to be able to access Home Assistant? for example, if HA is not configure for remote access and the Android device is not connected to the home’s WiFi network - will actions work?

Actions need to send data back home otherwise the automation won’t trigger

Fantastic Blueprint thank you. I have a question though: I create an automation with two action, I receive the notification but I can run just one of the actions because the notification disappear. I tried the persistent notification but without luck. How can I click on more than 1 action on the notification?

Use the sticky setting so it doesn’t disappear when you tap on it.

https://companion.home-assistant.io/docs/notifications/notifications-basic#sticky-notification

how would you apply that?? I couldn’t get it to work. I also tried persistent notifications but they don’t swipe away. see below

alias: Actionable Alert - Garage Open
description: ''
use_blueprint:
  path: vorion/actionable-notifications-for-android.yaml
  input:
    notify_device: f4042851132f11ebbe446f1efb348754
    trigger_entity: input_boolean.garage_door
    notification_title: Garage Door Open
    persistent_notification: "false"
    data:
      sticky: "true"
    action_1_title: Close Garage Door
    first_action:
      - service: cover.close_cover
        target:
          entity_id: cover.garage_door_controller
    action_2_uri: /lovelace-cameras/garage
    action_2_title: Garage Camera

my phone

I got a camera stream to work by dedicating a dashboard to cameras and assigning each camera to a view in panel mode. Take a look at action_2 above.

My question to the group, is there a better way to support a camera pop-up?

With the recent update of Home Assistant Companion for iOS (see Easier notifications in iOS 2021.5 - Home Assistant), this blueprint now also works on iOS :rocket:

Perhaps you would like to change the name of the blueprint :wink:

3 Likes