🔔 Notifications - Actionable Mobile Notifications Script, with optional Timeout Feature and Camera Snapshots [works with iOS/Android]

:beetle: Bugfix: Version 1.3.1

This is an Android only fix, iOS users may ignore this patch.

  • Fixed: Enable Icon Color - No longer overrides icon colour if disabled.
  • Updated: Icon Color hex template - Remove unrequired code, minor change.

Apologies for the frequent update - similar bug to last time, incorrect flag for Enable Icon Color.

How to update

Things to check after updating:

  • Scripts with Enable Icon Color disabled, should not override icon colour on Android phones.
  • As per usual, existing scripts should be loaded.
2 Likes

:new: iOS Action Icons: Version 1.3.2

Fine to ignore if you don’t need icons for iOS, and won’t be creating new scripts anytime soon.

How to update

Things to check after updating:

  • As per usual, existing scripts should be loaded
  • Script should show Version: 1.3.2

Known Issues:

  • iOS notifications do not respect Clear on Timeout since Version 1.3
    Version 1.4 beta testing is underway, to ensure I’ve covered enough use cases before releasing - estimate mid of July.
1 Like

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.

Yup thank you for the suggestion, that’s also exactly what I did! Just wanted to test ithe changes extensively before the next release.

There’s also be some additional features coming up!

1 Like

:new: iOS Action Icons: Version 1.4

Fine to ignore if you don’t use iOS, new additions are optional.

  • iOS/macOS: Notifications will now clear after timeout
  • Added Subtitle, Notification Grouping, Lockscreen Visibility options, details in blueprint label.
  • 🏷️ Tag is no longer required for some features to work.
  • During a timeout event, the script throws error into logs even when working properly, this is now fixed.

How to update

Things to check after updating:

  • As per usual, existing scripts should be loaded.
  • Script should show Version: 1.4.
  • You may clear the tag field if you have added one previously
    It is no longer required unless using the script for complex cases.

Known Issues:

There is at least one case where a user is unable to receive notifications on their iOS device
The issue is not reproducible on my end, but is probably due to an optional feature.

If this is happening to you, you may try to use an older version of the blueprint.
Known working version: Version 1.0

good job to both.
What should I change to use another service, i.e. pushover, if already integrated in HA?
This is an example I use for Internet disconnection:

Sorry for the italian language but it’s pretty clear.
Thanks

I’m assuming you’re trying to call another action besides sending the notification alert?

If so, you have a couple of options:

  1. You may simply add another action just like in this example below:

    This applies to all action fields.

  2. You may store all the actions you want into a separate script, then call the single script you’ve created to trigger all actions. The best part about this is it allows you to house more complex logic into that script and to compartmentalise functionality on your setup.

Hi.
In “Device to notify” it doesn’t tell me any devices. Which one should I put?
My notification service is called notify.mobile_app_nanu

Thanks

Hello @KameDomotics, thanks for taking time to try the script out.

The script only supports devices that has the official Home Assistant Companion app installed.
The domain expected would be mobile_app.<something>.

Could you check that you have your Mobile App integration in your Devices page?

Hi, yes I use the Companion App and I have the integration. I use it for push notifications and everything works. But with this script it doesn’t work, the notification service is not detected…

It’s not intended to use the notification service domain. Might be a difference in version as I’ve tried to reproduce, I’m still able to see devices with mobile apps on the latest versions.

I’ll take a look at using notification service as an option in the next revision.

Ok thanks, then I’ll wait for your news

Good work! Thanks!
Do you plan to include sending images (snapshots from cameras)?

Hey @Yannik, thank you for trying out the script, glad it worked out well for you.

I don’t yet intend to send snapshots yet as I don’t have any cameras at home to try.

Just curious - when you say snapshots from cameras, are the snapshots from images saved on the home assistant server or direct feed from a camera domain device?

Hello all,

Version 1.5 Beta - 1 Oct 2023

:link: Github Link
:male_detective:t2: Compare Changes

  • Updated: Deprecated device selector
  • Added: Notification Attachments

:warning: Please note, this is not a production release.

This beta release is meant help me find testers who have access to camera entities with video streams. Use at your own risk.

Hopefully, the update to device selector filter fixes the device selection issue @KameDomotics reported.

This change also allows users to add a camera entity to the notification.
(Sadly I do not have any camera entities in my setup. Only managed to test it with a robot vacuum map using camera domain - static image).
This would address @Yannik’s feature request for snapshots from cameras.

Feel free to try it out and let me know if you face issues!

Unfortunately it still doesn’t work, it doesn’t find any Companion app notification service



Oh man, I was hoping not to deviate from the current notification method to give users an easy way to configure.

Well, can you try this out in your free time? This should definitely work but it will require you to know absolutely which service to be called (in your case, your already know).

Version 1.5 Beta 2 - 2 Oct 2023

:link: Github Link
:male_detective:t2: Compare Changes

  • Updated: Deprecated device selector
  • Added: Notification Attachments
  • Added: Notification Strategy

:warning: Please note, this is not a production release.

This beta release is meant help me find testers who have access to camera entities with video streams. Use at your own risk.

when I save, I get the error “Message malformed: Missing input attachement_camera entity”. But all the camera fields in the blueprint are empty (I don’t use it). This makes saving impossible.

It doesn’t work, it doesn’t call the script, it doesn’t perform any action unfortunately.

alias: " Conferma Disattivazione Allarme"
use_blueprint:
  path: samuelthng/notifications.yaml
  input:
    notify_type: notify_service
    notify_service_name: inanu
    title: Home Assistant
    message: Disattivare Allarme?
    confirm_text: Conferma
    dismiss_text: Annulla
    confirm_action:
      - service: script.disattiva_allarme
        data: {}
    attachment_type: none
    attachment_camera_entity: No matching entities foun
icon: mdi:shield-check

I also tried this way, but it doesn’t work. It doesn’t call the service or perform any action when I click “Confirm” in the notification

alias: " Conferma Disattivazione Allarme"
use_blueprint:
  path: samuelthng/notifications.yaml
  input:
    notify_type: notify_service
    notify_service_name: inanu
    title: Home Assistant
    message: Disattivare Allarme?
    confirm_text: Conferma
    dismiss_text: Annulla
    confirm_action:
      - service: alarmo.disarm
        data:
          entity_id: alarm_control_panel.alarmo
          code: "1111"
    attachment_type: none
    attachment_camera_entity: No matching entities foun
icon: mdi:shield-check

Got it, thank you, this will help, I think that’s all the info I need so far! :+1:t2:

I’ll iron these out on my end and get it tested.