Yet not another door/window/sensor open warning notification with auto close and reminder

Hi @panhans, thanks a lot :slight_smile:

One more question:
I do have more entities configured:

Now, when entity #01 (red) has already triggered a notification (open window)

  • and Entity #02 (green) will be opened later → this will not trigger a new / second notification… am I right?
    Or will the Notification for Entity #01 will be “dismissed” when I close the Window from Entity #02 ?

Each defined entity can produce a separate notification. So entity1 can trigger a notification and entity2 also. They a unique using the tag in a notification service based on the entity id.

1 Like

Hi, is it possible to add a condition. e.g. only send when the outdoor temperature is below 15 degrees.

1 Like

Would be possible. But there is one problem: every time the temperature changes below 15°C a notification will be fired. The only way to save the state if a notification is allready send is a helper like a boolean input. I struggle with this issue in some other automations as well.

1 Like

Hi, I noticed one edge case in your blueprint…

  • I do have setup notifications when an update (core, hacs, or whatever) is available.
    As per confiugration, the notification will be disabled again, when the update has been done.

With one exception:
I do send the notification also to my mobile phone.
Now, I am updating the system on my Computer… the notification in the application will be disabled - but the notification on the phone is still active and can’t be removed until I reboot the phone.

For all other notifications which I’ve created in the same way - it is working well - when they will be triggered by any other state-change for an entity.
Only for the update entities it does not seem to work with the companion app… ?

Good stuff. I also would like to have outside temp combined with this temp. Also I have a humidity and temperature sensor in the shower, to determine if the open window has done it’s job after showering

1 Like

As I said it will get annoying because the automation doesnt know if a notification is already on your phone or in home assistant. So with every temperature change e.g. 15°C to 15.5°C a notification will be send again and again. If I debounce the automation or using a helper to save the state if a notification is send or deleted it will blocks other notifications for the other entities defined in the same automation.
The only solution is to define a threshold based template sensor and use that combined with the blueprint.

For example:

template:
  - binary_sensor:
      - name: "Airing Shower Temperature"
        state: >
          {{ states.sensor.my_temp_sensor.state | float(16) <= 15 }}
1 Like

Seems like the notification daemon is shut down before the update sensor changed its state. Maybe it needs another trigger after starting home assistant that checks all states of the entities defined in the automation. I will think about it.

1 Like

Hello I am getting an error trying to set up the blueprint.

Message malformed: string value is None for dictionary value @ data['action'][0]['then'][0]['then'][0]['service']

These are my inputs:

description: ""
alias: Doors are open!!!
use_blueprint:
  path: panhans/entity_state_persistent_norification.yaml
  input:
    sensor_entity:
      - binary_sensor.front_door_3
      - binary_sensor.back_door_2
      - binary_sensor.laundry_door
    notify_device: 6d41ea686d42dadcae16b5f72a8db5f3
    title: "{{ trigger.from_state.attributes.friendly_name }} is open"
    message: "Keep in mind: {{ trigger.from_state.attributes.friendly_name }} is open"
    ha_notification: true
    notify_group: group. Persons

I’m not sure what I could be doing wrong. I tried copying the code from your github page into the blueprints config folder, thinking maybe some indentations had somehow gotten misaligned, but that didn’t help. Any help appreciated. Thanks

Your notify group looks malformed. Try group.persons

That was my first effort at pasting code here, I added the three backquotes at the end after pasting and it auto corrected to that, but in my actual config it is “group.persons” and the error persists. It took me 5 tries to get that bit here without it getting auto corrected.

You dont need a group of persons. You need a notify group: Group - Home Assistant

working now, thanks

I keep getting a timeout when trying to import this blueprint.

howdy - tried every different variable but for some reason cannot get this to trigger and the trace timeline gives me
‘Stopped because of unknown reason “null” at January 22, 2023 at 3:07:39 PM (runtime: 0.02 seconds)’

the blueprint is configured below;

What am I missing?

No, problem here with importing. Button works for me as expected. You can try to import the blueprint manually by pasting the github link in the import blueprint dialog.

Is ther some more information when you click on the log message? Just check if you have the is the service notify.notify. just openen the developer tools and have a look in the service tab.

The notify service sends the notification to all devices. There is no need to specify a specific device like your iphone.

Is there a way to get this automation to only trigger if something else happening? Like when I change house state and the sensor is on? Now I get notification ewerytime a sensor get triggered. I can trigger with another automatation or node-red

Also, I am not able to remove the notification from my phone. Android problem I guess. But do you know how to remove?

The behaviour of the notifications is correct. They are persistent till the state of the observed entity switches. The idea is when you open a window you always have a persistent notification. The only way to close it is closing the window. Nevermind check out the new version. Now you can disable it for having swipeable notifications. (last option point)
Be sure to delete the old blueprint. I had a typo in the url. When you dont delete the old one it wont be overwritten.

I dont understand your use case correctly for your first problem. You don’t want to trigger the notification when a entity is in a defined state. You want to trigger it when the entity changes state but not the defined. Is this correct?

My notification do not change if I close the window.
Going to try out the new blueprint.

For the first question. I have a input select for house mode. (Home, Away, Night etc.). I would like it to only trigger a notification if i change the state to “Away” or something opens if the house is in “Away”.
I do not need to have a notofication telling me all the time that the window is open.
If it worked that the notification dissapared when I closed the window again it would be okey.