Sending Notifications to App

Hi guys!

I’m not asking about creating notifications or actionable ones, although that’s my next thing to tackle

I’m trying to figure out how to send the hassio notifications to the mobile app.

For instance, I have to reconfigure/reauthorize my Nest integration every so often. The only warning I receive is if I actually log into homeassistant. It’d be nice to get a notification on my phone for any notification that pops up in homeassistant.

Any help is most appreciated!

image

So if I understand correctly, you want to take a HA notification and have HA send out a phone notification for that message? If so you can create automation that looks for the specific notification id and then have the action be to send a notice to your phone. Something like this might be helpful:

trigger:
  - platform: event
    event_type: call_service
    event_data:
      domain: persistent_notification
      service: create
condition:
  - condition: template
    value_template: >
      {{ 'whatever_the_nest_notification_text_is' in
      trigger.event.data.service_data.notification_id }}
action:
  ... do your notification

Awesome, thank you!

Is there a way to push all notifications from homeassistant to the phone? Or do you have to set this up manually for each one?

Let’s say I get one for an available update, I’d love to see it on the phone.

You might regret doing that :slight_smile:. For instance, the various notifications that your phone or tablet is trying to access HA but is unauthorized would be annoying. I don’t know if there is a way to automatically send all notifications like that, the devs might see it as redundant since it’s in HA already and if you have HA on your phone…

You might be a able to take my example and make it more generic so that it triggers on any trigger.event.data.service_data and then use a script to parse out the details you want to be notified with, then any notification whatsoever would trigger that automation.

But you could take this a step further and turn this into a script that takes the text you are looking for inside of the notification_id as a variable so on the various notifications that you want you just create an automation and provide that text (this way you don’t have to keep creating the same logic each time).

Interesting, I may be using the wrong terminology.

I’m thinking of the notifications that specifically appear here.

image

The only ones I receive there are for the random integration that needs reconfiguring or an available update. Maybe one every few days at most?

You have the correct terminology and the solution I proposed was with that in mind.

Many thanks for the responses!