šŸ”” Actionable notifications for Android

Iā€™m having the same issue with my setup. :+1:

Turning off the input_boolean is in the automation, lines 120 and 121:

- service: input_boolean.turn_off
  entity_id: !input 'trigger_entity'

You might try commenting out those lines or deleting them and see if the automation still works for you. I havenā€™t tried it myself because Iā€™m using a boolean that I want turned off.

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