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

Oh man, I don’t understand why I had a old version because I had installed the blueprints after the last version… Anyway, I’ve deleted the blueprint and install it again and now it’s working well!!
Thanks a lot

1 Like

I’m getting “Device not connected to local push notifications” no matter what I do. I have an android device.

Suggestion: a condition for the state check, based on time, weather, sun, whatever

For example I would like the notification for my windows when it is raining or on the night! :slight_smile:

1 Like

Hey, thanks for your reply. I will add a custom condition so you can set it to whatever you want.

Hi @panhans ,

THANK YOU - you can’t imagine how long I´ve been searching for such an automation! :slight_smile:

You really made my day - no - even at least my month :wink:

I am a real noob in blueprints, so what would you think of adding an audio message to the blueprint like this? Or could you tell me where to integrate it to yours on my own?

  - service: tts.speak
    data:
      cache: true
      message: {{ entity_name }} is open! Please close!
      media_player_entity_id: 
        - media_player.bedroom
        - media_player.livingrooom
    target:
      entity_id: tts.piper

Thanks in advace!

Is there a option for presence monitoring so only notifications are sent when nobody is in the house? For example by monitoring presence of
mobile phone devices?

Not in current version. But I know this blueprint needs a little more love. I will add a custom condition. But I think this is a little tricky. Think I have to sort an recode some things in order to even check states on home assistant start.

No problem. So what you need is a custom action. Will se if I have time to implement this in near future.

Hi,
is it possible to place some time variable on the msg that gets sent?
something like “Door x/y/z open at hh:mm”

Sure. You can use jinja2 code as you like:

Door {{ entity_name }} open at {{ now().strftime('%H:%M') }}
1 Like

perfect :slight_smile:
just anothing quick one, to minimize junk in the phone screen, is there a way to suppress the message and just get the title, we can get plenty info in the tittle so I can add variables to it.
I tried delete all text on message and it just goes back to the default one.

Have you tried a single white space?

yep that works but still “eats” space but works :slight_smile:
btw if you are a prefeccionist like me
on the Notification state field, there’s a bug
“State whicht triggers notification”

Yes, this blueprint gets needs some rewrite. Will fix the naming with the next version. Thanks.

I just tried to send a notification without a message. This results in an error. So white space is the minimal solution I think.

humm not sure if this is a possible issue with the blueprint or something on my side but I noticed I only get notifications when I’m connected to my home network, this doesn’t trigger notifications when I’m out, is this supposed to be like that?

No, normally it doesn’t depend on the network. For me it works in every case. The blueprint only calls the home assistant notification service. There is nothing special about it.
Could you send a notification using the dev tools when you’re in a network where you miss notifications of that blueprint? Did you check the logs?

In order to send notifications immediately the time to live is set to 0. So the message doesn’t survive much long in home assistant notification queue.

Hi, strangely enough there seems to be a character limit for the notifications. Anything we can do about it? Can’t come up with shorter names for some windows haha

Logger

Logger: homeassistant.components.mobile_app.notify
Source: components/mobile_app/notify.py:198
Integration: Mobile App (documentation, issues)
First occurred: 7 December 2023 at 13:40:21 (16 occurrences)
Last logged: 11:57:52

The length of [apns-collapse-id] header must not exceed [64] bytes. This message is generated externally to Home Assistant.

Edit: entity ID’s can’t be too long. Fixed it myself :+1:

1 Like

I think the issue is with service: notify.notify, trying using dev tools to send any type of notification to my mobile (which is running the HA app) I get errors and can never send it but if I switch to service: notify.mobile_app_my_mobile it works.
from your code it should be using service: notify.mobile_app_, I don’t have any notification group created or listed in the automation, could it somehow be switching to service: notify.notify?
also just noticed this showing on logs, but it only shows when I’m outside my local LAN and don’t receive the notification
2023-12-08 12:57:21.212 ERROR (MainThread) [homeassistant.components.mobile_app.notify] The length of [apns-collapse-id] header must not exceed [64] bytes. This message is generated externally to Home Assistant.

1 Like

it seems the tag is too long. The blueprint creates a tag out of some values including the enitity_id. If the entity_id is much long it seems it will create an overflow and this error.
I think I will generate the tag using some kind of uuid or time stamp instead of the entity_id.

To use the notify.notify service just type in notify in the group an clear out the device fields:

@rafinesse @tretabyte I’ve updated the blueprint in order to get the tag shorter. But there is no other way to go with entity_ids.
The tag consists of the entity_id of the automation and the entity_id of the sensor. So the automation “knows” which notification shall be closed.

Old style:

automation.your_automation-psne-sensor.your_sensor

New style:

your_automationyour_sensor

Much shorter! But be sure your entity_ids aren’t so long. :smiley: