šŸ“ State Notifications & Actions

No problem, your welcome.

Blacky :smiley:

1 Like

Just to follow up, and in case anyone else runs into the issues, still looking lol, Iā€™m leaning towards some Samsung setting or restriction. Iā€™ve scoured the settings.

Last change was AOD on. In searching Iā€™ve seen similar issues with Samsung, mostly unresolved where some notifications donā€™t come thru until unlocked or awakened. All those unrestricted etc settings are there, run in background for HA, etc. etc.

If the phones open, theyā€™re instant.

I use biometrics, fingerprints.

I looked at HA itself, donā€™t fully understand all yet, still reading about priorities and channels etc. in the companion app. Or an HA bug perhaps. Iā€™m using HA Beta.

Your blueprint is working fine. I havenā€™t added actions or refined further until I figure out this HA, Samsung issue.

Iā€™m leaning Samsung S23 Ultra and/or Android.

Why only one notification ā€œthat Iā€™m awareā€ of does this is beyond me so far. Iā€™ll keep searching.

Further, Iā€™m reading this with interest, flagged as the solution in a post in HA forum. How I implement, I have to figure out. :joy:

The article I linked appears to have the fix for Androids not getting notifications on lock screen. Added at bottom of Blueprint Yaml appears to fix, so far. :+1: I am not a programmer. Lol

data:
ttl: 0
priority: high

Edit; or maybe not.:person_shrugging::thinking:

@G2740

Hi Dave

Thanks for reaching out. I understand the code, but all of this is already under development. I am currently waiting for Home Assistant (HA) as there might be a bug, not in what youā€™re doing, but elsewhere in the notifications. I have reported it to HA, and I am confident they will resolve it in due time. Once this is fixed, we can resume testing, and when it all checks out, we will release an update. This applies to all my notification blueprints.

Edit: Development has started again and will be an option to just select.

Blacky :smiley:

1 Like

FAQ - A Guide to Notification Options on iOS and Android Devices

:apple: iOS ONLY OPTIONS

What are Notification Interruption Levels on iOS?

On devices running iOS 15 and later, you can configure the interruption level for your notifications to ensure they are delivered according to your preferences. This feature allows you to choose how notifications are presented and how they interrupt your activities.

Interruption level Breaks through Focus Overrides Ring/Silent switch on iPhone and iPad
Default No No
Critical Notification Yes Yes
Time Sensitive Notification Yes - Must be enabled in focus No
Quiet notifications without waking screen No No

:robot: ANDROID ONLY OPTIONS

What are High Priority Notifications?

Notifications will appear immediately in most cases. However, in some cases (such as when the phone is stationary or when the screen has been turned off for a prolonged period of time), default notifications will not ring the phone until the screen is turned on. High priority notifications are designed to alert you to important events or updates that require your immediate attention, ensuring they are received promptly even in these situations.

What are Sticky Notifications?

Sticky notifications are a type of notification that remain on your deviceā€™s notification shade until they are manually dismissed by the user. Unlike regular notifications, which can disappear when they are tapped, sticky notifications ensure that important messages are persistently visible until you actively clear or swipe them away, ensuring that critical information stays visible until addressed.

Notification Channels

What are Notification Channels?

Notification channels are a feature for Android devices only. They allow you to categorize notifications, making it easier to manage and prioritize them. Each channel can have its own settings, such as notification style, sound, vibration, blink light, app icon badges, locked screen, and do not disturb, ensuring that you receive notifications in the manner most appropriate for each type of notification you receive.

How Do I Create a Notification Channel?

Before creating channels, it is best to consider what channels you would like to have for your notifications. This will help you structure it correctly, as once you create a channel, it can be removed but will never be deleted unless you reset your app. Taking the time to consider how you would like it structured will help you in the long run.

Some ideas for a channel structure are as follows:

You could just set the notification type. Emergency, General Notification, Dinner Ready, Time for Bed, Appliance Finished, etc.

Or maybe something like this.

  1. Critical
  • Sound and pop-up.
  • Vibrate.
  • Blink light.
  • Locked screen.
  • Ignore Do Not Disturb.
  • Description : Notifications for emergency situations (e.g., fire alarm, flood alert, smoke detector, carbon monoxide detector, security breaches).
  1. High
  • Sound and pop-up.
  • Vibrate.
  • Locked screen.
  • Ignore Do Not Disturb.
  • Description : Notifications for reminders (e.g., upcoming appointment, power outage, rubbish reminder).
  1. General (Default)
  • Sound.
  • Vibrate.
  • Description : Notifications for general updates (e.g., appliance finished, battery low).
  1. Low
  • Silent.
  • Vibrate.
  • Description : Notifications for less critical updates (e.g., appliance started, unavailable sensor, battery low).
  1. Minimal
  • Silent and minimized.
  • Description : Notifications for non-urgent updates (e.g., reminder, Home Assistant update avalible).

To create a new channel, simply enter a name in the input. When your automation sends the first notification, it will create the channel on your device. After the channel is created, you can customize its notification settings to your preference directly on your device.

How Do I Edit a Notification Channel?

There are a few ways to do this:

  1. On your device, go into Settings > Notifications > Home Assistant and you will see categories. These are your channels. Select the one you would like to customize and make your adjustments.
  2. When a notification is received, slowly slide it to the left and you will see a settings icon. Click on it, and it will take you to categories. These are your channels. Select the one you would like to customize and make your adjustments.

How Do I Delete a Notification Channel?

I have a blueprint that will help you remove a notification channel. See link below.

:robot: Android Notification Channel Manager

Hope this helps to explain some of the settings :face_with_monocle:

Enjoy

Blacky :smiley:

Back to FAQ: Click Here

New Update 1.3

This is a big update hope you like it.

:warning: Previously, if you selected an Android device, Sticky Notification was automatically included by default, with no option to disable it. Now, you have the flexibility to enable or disable this feature. If you wish to maintain the previous behavior, please ensure that the Sticky Notification option is enabled in both the start and end notify settings.

:new: New Feature - Collapsible Sections

  • Collapsible Sections - Added collapsible sections to the blueprint. This enhancement improves the blueprint user interface by making it cleaner and more organized, allowing sections to be collapsed.

    :warning: This feature was introduced in Home Assistant 2024.6, so you must have this version or later for the blueprint to work.

:new: New Feature - Confirmation Message

  • Confirmation Message - You can now have a different confirmation messages depending on your actions.

:apple: New Feature For iOS

  • Interruption Level - On devices running iOS 15 and later, you can now configure the interruption level for your notifications to ensure they are delivered according to your preferences. Choose the desired interruption level from the dropdown list. Critical and time-sensitive notifications must be turned ON within the Home Assistant App, and time-sensitive notifications must be allowed in your Focus settings.

:robot: New Feature For Android

  • High Priority notifications ensure that you receive important alerts immediately. These notifications bypass normal delivery delays and are delivered instantly to your device.

  • Sticky Notification ensure that important alerts are not dismissed when selected. They remain on your notification screen until you actively clear or swipe them away, ensuring that critical information stays visible until addressed.

  • Notification Channel allow you to easily organize different notification settings, including notification sounds, vibrations, and other device-specific features. Before crating a channel make sure you understand them and how they work. I have a FAQ that has information on channels, click here.

:toolbox: Maintenance

  • Set blueprint to my new layout.
  • Update input descriptions.
  • Clean up of some code :broom:

:rocket: Performance Upgrade

  • Some performance enhancements.

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:

1 Like

Blacky, Thanks for all the hard work on your blueprints. I am working with a couple of the notification blueprints and they both are having the same issue. If I use a standard notification it works fine. I receive it right away on my phone. however, once I enable Action button. I stop getting notified. nothing comes to the phone. Looking at a trace it looks to hang at waiting for a response but without the notification I canā€™t respond. I have checked and enabled all notification settings on the app on the phone. but I canā€™t seem to find the issue. Using a pixel 7. any help would be much appreciated.
Thanks.

@chesedro

Hi Tom, welcome to the community.

I just tested it here on a iPhone and Galaxy S8 and it is all working fine. Make sure you understand channels if you are using them.

Could you please provide us your YAML of the automation? This YAML code are the settings you have selected in the automation so I can help. To do this go into your automation, top right 3 dots, Edit in YAML, copy all the code, come back to the forum and in your reply at the top tool bar click on ā€œ</>ā€ and paste code in there.

Blacky :smiley:

Thanks for your help on this. This is a test automation I created to troubleshoot. Nothing fancy. I feel like itā€™s something simple. maybe even on the phone itself. I did test with ā€œHigh Priorityā€ ā€œStickyā€ and ā€œNotification Channelā€ same result. they all work fine until I enable the Start action button. Thanks again for your help on this.

To add: I created a quick automation manually but this time I used the Call Service Notification: this does work and presents the button in the notification just fine. Not sure what is different between the two methods.

`alias: Test-Notify
description: ""
use_blueprint:
  path: Blackshome/state-notifications-and-actions.yaml
  input:
    entity_a_trigger:
      - switch.living_room
    entity_a_state: "off"
    include_start_notify: enable_start_notify_options
    start_notify_device:
      - 0cb6a2d576dfe8bbf2d25d7bcc4cdb2b
    start_title: Not sure
    start_message: Will this work
    start_notify_data:
      - high_priority
    include_start_action_buttons:
      - enable_start_action_button_1
    start_action_button_1: Work Please
    include_start_auto_actions: []
    start_action_1:
      - service: switch.turn_off
        metadata: {}
        data: {}
        target:
          device_id: e32dcfd1b314bcc632dbb603dfb35d85
    start_time_delay:
      hours: 0
      minutes: 1
      seconds: 0
    include_start_action_button_confirmation: disable_start_action_button_confirmation
    start_notify_interruption_level: active`

@chesedro

Hi Tom,

I can see the problem now. It is not really a bug, but I will need to address it. With Android if you donā€™t put a name in the cancel button it will not work :pensive:. With iOS it will work :person_raising_hand:. So others donā€™t have this problem into the future I will have to add a default in. Below is your YAML. Copy and paste it in as I also saw there were quotes that shouldnā€™t be there, I think it was when you pasted it into this forum :face_with_diagonal_mouth:

Thanks for reaching out and letting us know as this will help other in the future :+1:

Your YAML below, copy it and replace your YAML.

alias: Test-Notify
description: ""
use_blueprint:
  path: Blackshome/state-notifications-and-actions.yaml
  input:
    entity_a_trigger:
      - switch.living_room
    entity_a_state: "off"
    include_start_notify: enable_start_notify_options
    start_notify_device:
      - 0cb6a2d576dfe8bbf2d25d7bcc4cdb2b
    start_title: Yep Working!
    start_message: Your Welcome, Blacky :)
    start_notify_data:
      - high_priority
    include_start_action_buttons:
      - enable_start_action_button_1
    start_action_button_1: Work Please
    include_start_auto_actions: []
    start_action_1:
      - service: switch.turn_off
        metadata: {}
        data: {}
        target:
          device_id: e32dcfd1b314bcc632dbb603dfb35d85
    start_time_delay:
      hours: 0
      minutes: 1
      seconds: 0
    include_start_action_button_confirmation: disable_start_action_button_confirmation
    start_notify_interruption_level: active
    start_action_button_stop: Cancel?

Let us know how you go.

Blacky :smiley:

Blacky,
That worked perfect. such a simple thing. Thanks so much. I do appreciate all your help with this.

T

Tom,

No problem your welcome, it is updated with a warning now. Push the update and you will receive it.

Blacky :smiley:

New Update 1.4

:toolbox: Maintenance

  • Updated descriptions warnings on action buttons that may prevent the automation from functioning correctly and could result in not receiving the notification.

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:

is there a way to show the action button direct, without expand the notification manuelly?

thanks for sharing...

1 Like

@stephanschleichstr13

I am assuming this is for iOS devices. To my knowledge no :pensive: I wish there wasā€¦ and I also wish there was an option to keep it there when you tap on it and it just doesnā€™t disappear. Android allows this but iOS doesnā€™t.

Blacky :smiley:

1 Like

Im using Android :slight_smile:
But no problem, its only nice to have, blueprint works great thanks for that.

1 Like

I am getting the following error in the System Log:

Error initializing 'Notify: Family Room Presence Stuck' trigger: In 'numeric_state' condition: entity binary_sensor.family_room_presence_presence state 'on' cannot be processed as a number

I wonder what I have configured wrong?

Here is my YAML:

alias: "Notify: Family Room Presence Stuck"
description: ""
use_blueprint:
  path: Blackshome/state-notifications-and-actions.yaml
  input:
    entity_a_trigger:
      - binary_sensor.family_room_presence_presence
    time_delay_a_state: 60
    start_notify_device:
      - 8fa2ea63fcc3370f9a13b4adabc08a60
    start_title: Stuck!
    start_message: Family Room Presence Sensor Stuck - been Detected for 1 hour!!
    entity_a_state: Detected
    entity_b_trigger:
      - binary_sensor.family_room_presence_presence
    entity_b_state: Clear
    time_delay_b_state: 0
    include_start_notify: enable_start_notify_options

@clowgg

Thanks for the info, I will have a look at it when I get back for holidays.

Blacky :smiley: