šŸ“ State Notifications & Actions

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

GitHub Link Click Here

State Your Trigger: Turn State Changes Into Notifications and Actions! :rocket:

Like this blueprint? Consider hitting the :heart: button below :+1:

Version: 1.5 :fire:

:warning:You must be on Home Assistant Version 2024.6 or later.

Need help? :eyes: See our FAQ: Click Here

:newspaper: The Automation Process:

  • State Triggers:

    • Define triggers based on entity state changes or numeric state changes (above or below a specified value).
    • Specify entities for both ā€œStart Entitiesā€ and ā€œEnd Entities.ā€ Both start and end entities serve as triggers.
  • Notification Options:

    • Option to send notifications to one or multiple devices when triggered.
    • Action Buttons (Optional):
      • Notifications can include up to 3 action buttons.
      • Each action button is linked to a designated custom action group.
      • Option to send a confirmation message when an action button is pressed.
      • The automation will continue after a specified time delay if an action button is not pressed.
    • Compatible with Apple iOS and Android devices.
  • Custom Actions:

    • Option to define up to 3 different action groups when triggered.
    • Each action group can contain as many actions as desired.
    • Each action group can be linked to a notification action button or executed automatically when the automation is triggered.
  • Custom Conditions:

    • Enter any custom conditions to further customize the automation process

:rocket: CHANGELOG

  • Version: 1.5 - 1 Sep-24 - Updated start and end triggers. :warning: Some work is required; please review the release notes before updating.
  • Version: 1.4 - 2 Aug-24 - Updated warning note on action buttons.
  • Version: 1.3 - 28 July-24 - Added collapsible sections, different confirmation messages for action buttons, and notification options for iOS and Android.
  • Version: 1.2 - 4 Jan-24 - Fixed a bug in ā€œStart Trigger - Numeric State Above Optionā€.
  • Version: 1.1 - 12 Sep-23 - Added numeric state triggers, time delay & global conditions.
  • Version: 1.0 - 10 Sep-23 - Initial release.

:shield: MY OTHER BLUEPRINTS

:bulb: Sensor Light - Motion Sensor - Door Sensor - Sun Elevation - LUX Value - Scenes - Time
:high_brightness: Smart Light - Entity - Sun Elevation - Ambient & Time Triggers
:infinity: Sensor Light Add On - Media & Movie Lights - House Alarm Lights - Smoke Alarm Lights & Exhaust Fans + More
:shower: Bathroom Humidity Exhaust Fan
:low_battery: Low Battery Notifications & Actions
:vibration_mode: Appliance Notifications & Actions - Washing Machine - Clothes Dryer - Dish Washer - ETC
:loudspeaker: Notifications & Announcements
:calendar: Calendar Notifications & Actions
:robot: Android Notification Channel Manager
:toilet: Toilet Exhaust Fan with time delay
:hourglass_flowing_sand: Entity - Run ON Timer
:stopwatch: Trigger - Run ON Timer
:magic_wand: Manual light control with auto OFF
:door: Closet, Pantry, and Cupboard Lighting
:timer_clock: Timer
:thermometer: Temperature Control Fan
:snowflake: Temperature Control Exhaust Fan - Inverted
:eight_spoked_asterisk: Toggle Switch - Turn ON & OFF Entities
:nazar_amulet: Press Button - Turn ON & OFF Entities
:on: Switch - Turn ON & OFF Entities

Like this blueprint? Consider hitting the :heart: button below :+1:

13 Likes

FAQ

FAQ: How do I include the sensor name that triggered the automation in the message?

A: Please follow these steps Click Here

:construction_worker_man: :construction: The Settings & Best Practice Guidelines :construction: :construction_worker_woman:

Initial release 1.0

New blueprint :partying_face: Hope you like it :wink:

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:

2 Likes

New Update 1.1

New Features :new:

  1. Added numeric state to start and end triggers. You can now select above and below values. Example: You could have a temperature sensor in your bedroom and when the temperature rises above your set value it will send you a message. You then can have 3 action buttons + cancel button to:

    1. Close the blinds.
    2. Turn The Fan ON
    3. Close the blinds and turn the fan ON
    4. Cancel do nothing
  2. Added time delay to start and end triggers. The state trigger will only fire if the state holds for the set time delay. This helps to stop false triggers. Example: If you are using ā€œunavailableā€ state sometime it can be ā€œunavailableā€ for a few seconds to a few minutes and then go back online, or the temp in you bedroom must be above your set value for the time delay before the automation will fire.

  3. Global conditions. You can now enter any global condition you would like to apply to the automation. Example; You could have motion sensors in your home. Then you could set a condition to only run when no one is home. If you detect motion it will send you a message. You then could have action buttons to

    1. ā€œSound The Alarmā€ an play a voice recording ā€œthe Police have been called and are on their wayā€.
    2. ā€œSound The Alarmā€ and turn the lights ON (using by-pass of my sensor light blueprint).
    3. ā€œSound The Alarmā€, turn on sensor light by-pass ā€œAlarmā€ and strobe the lights for 10 minutes.
    4. ā€œCancel do nothingā€

    Or you could have an Office with motion sensors & CCTV. You could set a time condition to only run out of hours. If motion is detected it can send you a message with 3 action buttons + cancel button to what you like.

There a lot things this blueprint can now do. Hope you find it useful

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:

Nice blueprint. Just created my first automation based on it.

Some suggestions:

  • setting to adjust the notification icon
  • possibility to toggle persistent notifications?
  • setting to enable critical notifications
  • setting for the notification channel

See also this blueprint for some more inspiration: Frigate Mobile App Notifications 2.0 - #1262 by kritikos24

1 Like

One minor bug in this that should be pretty easy to fix in the next release - when you create a blank automation using this Blueprint, the field for Start Trigger - Numeric State Above Option is instead of 0 like the other triggers. This causes an error when you try to save the automation unless you manually put a 0 (or other value) into the box. All the other boxes populate with a 0 value so if they are unused, the automation will save. Not a major issue, but definitely confused me for a bit when I wasnā€™t using those fields.

Nice one.

My notifications are a quick basic way. There are other blueprints that dig deeper into notifications. Must say I havenā€™t looked at it just because I dont need that blueprint but I know it is very active and the developer @SgtBatten supports it well so if that suits you better maybe try using it and ask the developer of that blueprint.

If you would like more complex way in your notifications I have seen @samuelthng blueprint. It creates a script with heaps of options you can have in a realy nice layed out way. Once you create a script with this blueprint you can use it in this blueprint in the custom action. In your action select call service / scripts: Turn on and select your script. That just may help you do what your looking for. Link to it is below.

Hope this helps you.

Blacky :smiley:

2 Likes

@jsp196

Hay nice oneā€¦ sorry for that and thanks for the heads up :wink:. I will fix it ASAP and do an update now :+1:

Blacky :smiley:

New Update 1.2

Bugs Fixes :bug:

  • Fixed a bug in ā€œStart Trigger - Numeric State Above Optionā€ where a defaul value was not set preventing you from saving the blueprint if nothing was selected. Thanks @jsp196 for giving us the heads up.

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:

Question now that Iā€™m going to use this for more things - I currently run HASS.Agent on a desktop computer. I can call the notify.computername service using the same format as the iOS app. It also supports actionable notifications. But this device does not show up in the picker of this blueprint for Start Notify - Devices To Notify. Is there a way to allow all notify-capable devices to work? I could see an instance where I would want my Alexa to say something or another device to receive the notification. Currently it only lists devices that are included in the Mobile App integration. Thanks!

I havenā€™t tested it but you could try to copy tour entity of the device you would like to otify then enter in mobile phone / then edit the automation in YAML (top right 3 dots) / the paste your entity replacing the mobile phone and save. Your device should be there.

or you can enter in a start actions.

Test it out an let us know.

Blacky :smiley:

Another great template!

One thing I think is missing is the ability to set the notification persistent and be able to dismiss from an action button.

I have this template binary_sensor that goes ON on specific trigger and can be reset from the press of an input_button. If I could present a persistent notification on my mobile device while binary sensor is in ON state and add an action to press the input_button (which subsequently sets back the binary_sensor to OFF), it would be perfect for my use case.

Thanks.

Have a look at the below blueprint as it just may be what your looking for.

Blacky :smiley:

1 Like

The ā€œDataā€ field is need for the notifications. Android phones need items such as:
ttl: 0
priority: high

Otherwise the notifications wonā€™t show if the phone is asleep.

Thanks for the head up, I will add it to the list.

Blacky :smiley:

I have a bug in automation:

Error in ā€˜State Notifications & Actionsā€™ trigger: In ā€˜numeric_stateā€™ condition: entity switch.lazienka_switch state ā€˜onā€™ cannot be processed as a number

@pidzej

Thanks for pointing this out. The automation runs but has some error logs. I will look into it.

With your State please use all lower case. So it should be ā€œonā€ not ā€œONā€ without the quotes so = on

If using a message you must input a title and message as well or it will not run.

Again thanks and I will look into the error logs.

Let us know how you go.

Blacky :smiley:

Very nice Blueprint!

One Question: I want to use the Blueprint for 2 Automations:

  1. Window Left open notification
  2. Humidity in Bathroom to High notification

For the Window Left open it would be great to set the time delay to more than 10 minutes (I would like to get notified after 20 minutes).

@Stothed

If you use the ā€œStart Trigger - Time Delayā€ and just type in ā€œ20ā€ and click save.

Blacky :smiley: