📢 Notifications & Announcements

Dear Craig
thanks for warm welcome.

alias: Water leak
description: ""
use_blueprint:
  path: Blackshome/notifications-and-announcements.yaml
  input:
    trigger_state_entity:
      - binary_sensor.water_leak_vanna_water_leak
      - binary_sensor.water_leak_kuhnea_water_leak
    notify_device:
      - b7e71979213cdfef9124f541a103fdbc
    include_notify: enable_mobile_app_notify
notify_title: 📢 Water leak detected
notify_message: Shut off taps urgently🙂
    notify_data:
      - high_priority
      - sticky
    global_conditions: []
    include_persistent_notification: enable_persistent_notification
    persistent_message: Shut off the taps urgently🙂
    persistent_title: 📢 Water leak detected

i want to receive notifications with trigger.entity_id.

also i get problem if Z2m restarts or reconnect to waterleak detectors i receive notifications so i cant use them to prevent waterleaks due to false positives.
If i install water switch-off valve when reconnecting z2m i will get false positives

@burjuyz

Thanks for your YAML. I have fixed it for you as there were some this wrong. Below is your code, copy and paste it replacing all the YAML.

What I changed.

  1. You had a indent issue that I fixed.
  2. Trigger State I clanged it to option 2, so when your leak is detected and your leak detector goes ON (wet) it triggers the automation not when it goes OFF or unavailable. This may help false trigger as you had it set to option 1, this means if it goes ON or OFF and when you restarts or reconnect Z2m it my be unavailable then OFF and that will trigger the automation.
  3. In Triggers section I have added 2 seconds to Time Delay. This way it must be ON for 2 seconds to send the notification. This may help in your false positives. Adjust this to suit your needs. See you may get your sensor go ON when Z2m restarts or reconnects for a millisecond or even a second. So if this happens then it will not trigger as the sensor must be ON for at least 2 seconds to trigger the automation. Again adjust to your site conditions as you see fit. It was set on “0” and because we changed the trigger state to option 2 you may be able to set this back to “0”.
alias: Water leak
description: ""
use_blueprint:
  path: Blackshome/notifications-and-announcements.yaml
  input:
    trigger_state_entity:
      - binary_sensor.water_leak_vanna_water_leak
      - binary_sensor.water_leak_kuhnea_water_leak
    notify_device:
      - b7e71979213cdfef9124f541a103fdbc
    include_notify: enable_mobile_app_notify
    notify_title: 📢 Water leak detected
    notify_message: >-
      Shut off {{ states[trigger.entity_id].attributes.friendly_name }} taps
      urgently🙂
    notify_data:
      - high_priority
      - sticky
    global_conditions: []
    include_persistent_notification: enable_persistent_notification
    persistent_message: >-
      Shut off the {{ states[trigger.entity_id].attributes.friendly_name }} taps
      urgently🙂
    persistent_title: 📢 Water leak detected
    trigger_state: "on"
    time_delay_state:
      hours: 0
      minutes: 0
      seconds: 2

Hope this helps.

Blacky :smiley:

1 Like

Dear Blacky
Huge thanks for your kindness and detailed explanations.
Will you plan to add telegram notifications?

@burjuyz

Maybe I add a custom notification so you can add anything you like. I will put it on the list, thanks for your suggestion.

Blacky :smiley:

1 Like

Is it possible to display the actual value of the entity that triggered the notification?

Thanks in advance

Yep by using trigger.to_state.state, see the code below and enter it in your message input.

{{ states[trigger.entity_id].attributes.friendly_name }} triggered with a value of {{ trigger.to_state.state }}

Blacky :smiley:

1 Like

Anyway to notify a notification group?

@sandwormzz

Welcome to the community.

Nope, currently you have to add them in separately.

Blacky :smiley:

Hi Blacky. This is the Blueprint I was looking for. Your Blueprints are incredible. I use most of them with no issues. Are you able to change the default IOS notification sound with this alert? I don’t see where or how to do that.

@Moe1

Thanks for the heads up as I haven’t added it to this blueprint yet. I will update it now… once updated you will have the option to change the sound for IOS.

Blacky :smiley:

1 Like

Followed your instructions on how to import the custom WAV file and it worked like a charm. This Blueprint can be used in so many ways. I would think it would be in everyone’s wheelhouse. Thanks again for your time and efforts!

New Update 1.3

State your trigger and spread the word :speech_balloon: :sound:

:apple: New Feature For iOS

  • Notification Sound - The Home Assistant app for iOS includes built-in notification sounds, and you can import sounds from your iOS device into the app. Custom sounds can also be added via iTunes or from your cloud storage.

For more information on using sounds in the Home Assistant app, click here.

Maintenance :toolbox:

  • From time to time, Home Assistant updates their YAML standards and coding practices. To align with their roadmap, we’ve updated the code accordingly. We will continue to apply these updates across all our blueprints as they are revised.

If you like this blueprint? Consider hitting the :heart: button in the top post :+1:

If you like my blueprints, and would like to show your support or just say thank you? Click Here :smiling_face_with_three_hearts:

Enjoy

Blacky :grinning:

Works Great!!!

THANKS!!!

@Blacky can you add the ability to show the date and time in the Alert message?

ie The door was opened at {date} {time}

would be nice to know the exact time of the alert happened.

@andyblac

Hi Andy

Sure depending on what you would like.


# This give you time 12 hr format
{{ now().strftime('%I:%M:%S %p').lstrip('0') }}

# This give you time 24 hr format
{{ now().strftime('%H:%M:%S') }}

# This gives you date - change year, month and day to suit you.
{{ now().strftime('%Y-%m-%d') }}

Blacky :smiley:

2 Likes

@Blacky thanks that worked ok, another suggestion, Can you add the ability to perform an action on tapping on the mobile notification, i.e. open a dashboard (the room)

@andyblac

Have you looked at :round_pushpin: State Notifications & Actions

Blacky :smiley:

Thanks for the blueprint ill transfer some love by paypal, i really liked the blueprint for the lights with night glow etc :slight_smile:

Just an idea, i used to have a telegram notification option which i used to sent a picture of my cam when the doorbel was press.
Also when the mailbox was opened.

Maybe an option to let a cam make a screenshot and then add this screenshot to the notification on the HA app.

edit: btw where is ur paypal link, im sure i just seen it ?

Edit: found it :slight_smile:

@vincenttor

Thanks for you suggestion I will put it on the list. I have some new features coming out in this blueprint soon so stay tuned.

Blacky :smiley:

2 Likes

great, thanks, i do have the script somewhere that i used for it but it was “hard coded” for in telegram , the problem i found was that the images are deleted in HA notifications and telegram they could be seen and stay there.

But there probably will be another way to be able to scroll trough the latest captures in HA if thats needed.

Could be a nice addition that u can see who done what.

edit: i just used the notification on mediaplayers, could be a nice option to set the volume before it gives a notice, if possble and then revert back to the old volume or something.

1 Like