Sounds good! I’m certainly no power user, so I’m sure it could be done better.
Another frustration I have that I don’t see a way to fix is the timeout function.
If you don’t clear the notification on timeout, the action buttons no longer work. But a timeout is required, so you either have to set a very long timeout (for example 24 hours) and don’t clear the notification, or you have to use a timeout action.
I think the answer for me is going to be create a blueprint without the timeout functionality for when I don’t need it, but I was curious of your thoughts.
Edit: For now I’ve created another blueprint without any timeout functions. I’m sure there’s a way to set a variable to either use or not use the timeout function if it’s set, but I don’t have the know-how to do that!
@samuelthng I have a few other ideas I’d like to see about implementing. Namely a clickAction so that if you tap on the notification it opens a URL/navigates to a specific spot in the app.
It’s a simple call under data, in the same spot as the icon and color. Unfortunately, it’s named clickAction for Android, and just url for iPhone… so there’s probably not a good way to implement this universally and easily.
I had a weird case today where the timeout occurred when my phone was without reception. It did not receive the clear_notification notification from the automation timing out, so the notification remained even though the script had already timed out.
It might be a bit cleaner to include the following in the notification itself if timeout is enabled. That way the app on the phone removes the notification instead of relying on home assistant to send a clear_notification to the device. This is also under data: in the notification setup and would only be set if clear_on_timeout and timeout_duration are both set.
timeout: 600 # How many seconds the notification should be received by the device
I’ve had a few different blueprints for notifications and this has quickly become my favorite by far!
Again, thanks to joe.cole1 for the insights in this minor release.
Also, thanks to RemyyB for identifying the incorrect variable and raising a PR.
Sorry to everyone for taking a week to fix this. 🙇🏻♂️
( Color picker is easy enough to configure, so it shouldn’t be absolutely breaking to warrant a major)
For your issues with iOS clear on timeout… I don’t have apple devices so I can’t test, but with my modifications to use notify. groups instead of individual devices, I needed to add back in your old style of clearing notifications so that when one device chose an action or dismissed it would do so on all devices. So my modified blueprint has both the “built into the notification” dismiss function as well as your older timer based clear notification.
Works great! That might be a good solution to cover all bases.