"Temporary" Notification in UI

A new notification service similar to ‘persistent_notification’ that shows user defined text in the bottom left corner of the UI for a short period of time. Visually, this is the same as the notification that appears confirming UI switch actions. The notification should be activated via a service call allowing scripts to display non-blocking, non-persistent information in the GUI.

Credit to @cvoid_twitter for this idea.

2 Likes

You might not even need a new service.

If you had a way to programmatically dismiss persistent notifications after a configurable period, you could probably use the alert component with persistent notifications and accomplish what you want.

I was discussing something similar in a thread about persistent and asked if there was a way to dismiss them via a script or automation but it doesn’t appear there is a service available to dismiss. I thought it was a good idea but didn’t push it as I thought people would say, “The whole point of a persistent is that it bugs you until you dismiss it. That’s silly!”

But I guess I am not the only one thinking along these lines.

Good thought @rpitera. Personally, I’d like both options - one that shows as a card and can be dismissed; one that shows in the bottom corner.

Overall, it might be better to move this type functionality out of ‘persistent_notification’ service and into a built-in ‘notify.ui’ service with options for how alert would appear – but that would be a breaking change and likely require larger rewrite.

Since the UI already has functionality for displaying these messages in the bottom left of UI, I had hoped the code to allow calls from a user-accessible service would be easy to add.

You mean a toast notification. I’m not sure if they can designate a toast notification with a specific time apart from the core, but that would be cool. I’m not sure if it would require some changes to the front end as I never really looked at how toasts are called in HA.

“Toast” - hadn’t heard that description before. Custom time of display doesn’t matter to me as much as custom text.

Toasts are designed as a transient notification though; they pop up and fade away by design.

Although now that I think about it, when you restart HA the connection lost toast stays active until it’s reconnected so that may work.

Why not just use HTML5 push notifications? Yeah, they’re a PITA to set up, but they do exactly this.

not everbody wants to expose his HA instance to the world…

@rpitera, @ih8gates
‘Transient’ notifications are exactly what I’m looking for. Ie, this is information that would be useful to a user who is logged in and looking at the UI but not worth the disruption of a regular, pushed notification. AFAIK, that type of notice is not yet possible in HA.

Mine would fall similar to this request. I have a toggle switch on a script, which actually just turns a service on, and run it again it turns the toggle off. Now i get that popup notification in the bottom left corner that the action was run. Instead i want to be able to set the text for that specific popup. Because i want to show say “Executed, Turned on” and on next click it would be “Executed, turned off” the time it shows and all the logic as is, is sufficient for me. But above request make sense too.

Similar thinking but I would like the script to publish as it processes different steps in a script. So I know how far along the script is.

fyi: the persistent notification dismiss service is available since about a year.

Was looking if a toast notification was available. Indeed the Persistent Notification is one.
But I would also like a none persistent one that shows and goes away after x seconds (shows in the UI).

The reason I was searching for this is getting notified on a automation.reload succes. I like my confirmations :slight_smile:

Is this something more people would like? Or is this already possible in a way.

Browser mod can do toast but I don’t know what other option are available for it…

1 Like