📍 State Notifications & Actions

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:

Hi @Blacky

is there any way to notify devices that are in a specific zone? for example, devices inside of “home”

@eerison

Welcome to the community.

If you are only notifying one device it easy as you just use the custom conditions and add the device as a condition.

I am going to look at adding this feature.

Blacky :smiley:

1 Like

Hey @Blacky
Thank you for your quickly answer.

Well i would like to notify all users that are at home.

Maybe a field on notification called zone. And there i could specify the zone that i want.

Note: in case I could pass a list of zones, it would be amazing, if not one helps a lot.

@eerison

Thanks for your input and your suggestions.

You will probably see it in my :loudspeaker: Notifications & Announcements BP first and then it will flow out to all the others.

Blacky :smiley:

@clowgg

I will be working on this error log but one thing I noticed in your YAML, your state is Detected. Not sure if that is working for you but have a look at the state in developer tools and match it. I may say on, note it is also cap sensitive.

Blacky :smiley:

I’ve checked the sensor in Dev Tools and it currently shows as ‘on’.
So I’ve changed the setting in the Automation to ‘on’.
I assume the clear state will be ‘off’ - so I set that in the End Trigger - Fixed State Option too.

Then I checked the System\Logs and saw this:

Logger: homeassistant.components.homeassistant.triggers.numeric_state
Source: components/homeassistant/triggers/numeric_state.py:153
integration: Home Assistant Core Integration (documentation, issues)
First occurred: August 30, 2024 at 2:45:00 PM (12 occurrences)
Last logged: 10:55:13 PM

Error initializing 'Notify: Family Room Presence Stuck' trigger: In 'numeric_state' condition: entity binary_sensor.family_room_presence_presence state 'off' cannot be processed as a number
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

@clowgg

Yes thank you… I can see it too but I thought I get you going first and then fix the problem. It is only a log issue and the automation will work.

Blacky :smiley:

Thanks for the help Blacky.

1 Like

New Update 1.5

:warning: Some work is required with this update, so ensure you have time to edit your YAML files. The process is straightforward. Please see below for instructions on what to do.

:new: New Feature - Start and End Triggers

  • Triggers - We’ve updated the start and end triggers for several reasons:

    1. Fixed an error log that required a new input.
    2. Added more trigger options, including button-triggered actions.
    3. Simplified usage with dropdown selections for trigger states, reducing errors.
    4. Improved layout for start and end triggers.
    5. Enhanced input descriptions for easier code management.
    6. Ensured continuity with other blueprints for a consistent experience.

:warning: :stethoscope: STEPS REQUIRED WHEN UPGRADING :white_check_mark:

If you’re unsure or uncomfortable with editing, you can delete your old automations and recreate them. However, if you’re confident with editing a bit of code, follow the steps below.

Best to record your settings by taking a screenshot or writing them down before updating the blueprint. We are only focusing on the trigger section.

  1. Navigate to Settings > Automation > Filters (top right) > Blueprints and select the State Notifications & Actions blueprint. This will display a list of automations using this blueprint.

    For each automation, click the three dots in the top right and select “Edit in YAML”. Look for the following lines of code. If you don’t see these lines, you may not have selected the options, and the code might not be visible. It’s okay if you can’t find all the lines.

    • entity_a_trigger:
    • entity_a_state:
    • below_vale_a_state:
    • above_vale_a_state:
    • time_delay_a_state:
    • entity_b_trigger:
    • entity_b_state:
    • below_vale_b_state:
    • above_vale_b_state:
    • time_delay_b_state:

    Review these settings, and either take note of your current configurations or copy the code for reference before deleting or modifying it.

  2. Delete all the code containing the lines shown above, including your selections. You may see additional code not listed here; only delete the specified lines and avoid removing any other code. Do not click “Save”; instead, click on the three dots and select “Edit in Visual Editor”.

  3. Re-enter your inputs for both Start Trigger and End Trigger if you used these options.

  4. Click Save, and you’re done :partying_face:


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 it possible to delete/cancel a notification sent with this blueprint?

What I mean:
Let’s say I watch the state of my front door and if left open for x minutes everyone in my family receives a notification via this blueprint.
So far no problem, that’s easy.
But after someone closes the front door I don’t need the notification still showing in all mobile phones cause there is no longer any action needed.

@Eimeel

Yes you can do it through the start actions but you will need to set up your notifications there. It also depends on iOS or Android limitations.

Blacky :smiley:

1 Like

I’m migrating from Node-RED to Blueprints because of your cool blueprints, thanks for making them! I would like to have one automation to report on either a dishwasher or washing machine leak and I would like to use the entity that triggered the automation in my notification with something like {{ entity }} similar to how you can also do this with your battery blueprint. Is that possible?

Is it also possible to add a follow up action? For example, I would like to disable the power socket when the dishwasher leak sensor turns on. I can’t seem to find that option in the Blueprint, but I’m quite new to it and don’t know all the extension possibilities yet.

And a small thing: there are a few typo’s mentioning “Opion” instead of “Option” :slight_smile:

Thanks!

@TheAutomator

Your welcome.

I have a FAQ for this.

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

A: Please follow these steps Click Here

You can use either action buttons or just the action itself. However, I recommend setting up a separate automation for each leak sensor. Since it’s a water leak sensor, relying on action buttons could delay your response. Instead, it’s better to trigger the action to turn OFF the power socket immediately when a leak is detected. You can also set up an end notification to confirm the power socket is OFF or trigger any other actions you need.

Once everything is configured, make sure to perform a dry run to test and ensure it works as expected.

Edit:

I can’t see where this is?

Blacky :smiley:

Aaah, I see now. I have picked the Notifications & Announcement blueprint instead of this one. Apologies! Now everything is clear, thank you! The typo is also in that blueprint.

@TheAutomator

Yeah I have a few blueprints.
Thanks for the info. If you update Notifications & Announcement blueprint the typo is fixed.

Blacky :smiley:

Thanks! I am using the blueprint now for my leakage sensors. I wanted to use the End trigger == OFF to report back if the leakage is solved but on every Home Assistant restart it now triggers the end trigger. Is there a way to ignore the state change on startup? Thanks!

@TheAutomator

Nice to know you all up and running… thanks for the heads up, I will look into this.

Blacky :smiley:

1 Like

Thanks! Yes, all up and running thanks to your great blueprints! No idea how you are able to build and maintain these mega large blueprints, props!

1 Like