🪫 Low Battery Notifications & Actions

@rwalker

Hi Roy,

I have tested it here again with Apple and Android devices and they are excluded. Just make sure your applying the label to the battery level entity of that device not just the device as a whole.

Blacky :grinning:

1 Like

@avoronkov

Hi Andrew, the option is already there just make sure you don’t select the Okay Confirmation Message. See below.

Edit: Thanks @muesli79 … I just go down the list and answer the questions and didn’t see you already done that.
Blacky :grinning:

1 Like

Thanx a lot i didn’t fully uderstant the description of this setting lol i was looking for OK button in notifications )) @muesli79 thanx for your reply as well!

2 Likes

I just want to give a big thank you :slight_smile: This blueprint works very fine for me. Thank to this, I found out, that twoIKEA door sensors were not working. They showed as doors being opened, but the doors were actually closed. The battery state was unavaiable, so the notification showed both sensors to me, and I could fix them :+1:

@BastiKA84

Thanks for your kind words, it’s really nice to get these ones.

Enjoy the blueprint.

Blacky :grinning:

Hi Blacky,

Thanks for the blueprint. After installation and testing the automation, I receive a message that some devices have 0% battery level. However when I check the battery levels of these devices in HA, they all have battery levels of 100%, so more than the 20% which has been set in the blueprint. Can you help me?

@cmartens

Try this:
Go to Settings > Devices & Services > Entities (tab at the top).
Make sure all filters are cleared, then search for the entity name mentioned in the notification. You might have a duplicate that you overlooked. You can also try searching for ā€œBatteryā€.

Hopefully, you’ll find the one showing 0%… it’s in there somewhere.

Blacky :grinning:

1 Like

@Blacky I’m running v2.9 and it runs twice, simultaneously. I get two sets of persistent notifications at the same exact time of day (what I have set in the BP)

alias: Low Battery Notifications & Actions
description: ""
use_blueprint:
  path: Blackshome/low-battery-notifications-and-actions.yaml
  input:
    time: "04:00:00"
    include_easy_notify: enable_easy_okay_notify
    notify_device:
      - 4c405513584e73a3a8a3a9996bc35562
    notify_channel: system
    include_custom_actions: enable_custom_actions
    custom_actions:
      - metadata: {}
        data:
          title: 🪫Low Battery Notification
          message: >-
            {% set formatted_sensors = all_sensors|replace(', ', '\n•
            ')|replace('Battery is', '…')|replace('level @', '…')|replace('level
            is', '…')|replace('!', '') %} • {{ formatted_sensors }}
        action: notify.persistent_notification
    notify_data:
      - sticky
      - channel
    notify_okay_message: No Low Batteries
    include_persistent_notification: enable_persistent_okay_notification
    include_time: time_enabled
    sensor_selection: enable_all_and_custom_group_sensors

Hi Blacky,

Thanks for your quick reaction. I checked the entities and saw that they are related to the Ring Keypad v2 (Zwave). The blueprint reports a number of entities that are indeed 0 (sensor.keypad_v2_charging_status, sensor.keypad_v2_maximum_capacity, sensor.keypad_v2_recharge_or_replace and sensor.keypad_v2_temperature) or low (sensor.keypad_v2_rechargeable). However, I would expect that the blueprint reports only the level of entity sensor.keypad_hal_battery_level when it is less than 20% (currently 100%). Is there something that I should change to let it report only the battery_level entities?


@Ltek

Thant is because you have set up 2 persistent notifications.

One is set up here

and you have another one set up in the custom action so you get 2 off them.

Blacky :grinning:

1 Like

@cmartens

There are two ways to exclude entities from the battery check:

1. Using a Labels:
Create a label called Excluded From Battery Check and assign it to any entities you want the automation to ignore (e.g., those at 0%).

  • Open an entity and type the label name (e.g., Excluded From Battery Check) into the Entity Label field… this creates the label.
  • For other entities, simply select the label from the list.
  • In the automation, go to Battery Settings > Excluded Battery Sensors and choose the label Excluded From Battery Check. All entities with this label will be excluded now.

2. Manually Select Entities:
Another way is, in the automation, go to Battery Settings > Excluded Battery Sensors and manually select all the entities you want to exclude.

Blacky :grinning:

2 Likes

Yup… I noticed it a few hours after I posted. I must have accidently clicked to enable the Easy Notify weeks after I built it since I customized the notification myself.

btw, I’ve learned a lot from your BPs, thank you! I published a BP for Offline / Unknown devices. (a few more coming soon). I’m curious if you have ever tried to create code to exclude devices based on a string in the Entity_ID or Name? (eg, DoNotInclude). I’ve tried multiple ways (regex, rejectattr filter, etc) and nothing works. Happy to take offline if you’d like to explore this with me… its the most powerful thing that we could add to BPs like this, and I’ve spent hours manually and with AI… nothing works

3 posts were merged into an existing topic: Help to get working… multiple string exclusions from entity_id and name

I just imported the blueprint for the first time, but when I make any changes to the settings and try to save, this error message appears after a few seconds:

Automation setup failed

New automation(s) was saved, but the wait for setup has expired. This may be due to errors when parsing your configuration.yaml file. Please check the configuration in the developer tools. Your automation(s) will not be displayed until this has been corrected and the automations have been reloaded. Changes to the area, category or labelling have not been saved and must be reapplied.

Translated with DeepL.com (free version)

What am I doing wrong? My configuration.yaml is fine.

@Blacky, thanks! This solved the issue immediately.

@dantist

That’s not good.

We know the blueprint is good as I use it here and many people have downloaded it and use it, so we can rule that out.

Let’s go through it slowly to see if we can find the problem.

  1. First click on the import blueprint button again at the top of this thread. This will re-import it just encase something when wrong when doing it for the first time.
  2. Open the blueprint and without adding any inputs click save, change the file name if needed.
  3. Once this works close it down and go into your automations now and look for the saved low battery automation. Click on it and open it up.
  4. Work through the blueprint automation and after every input you do click save and it should save without any errors. If you have an error then you know it was the last input you did so you can pinpoint it.

Hopefully it will all workout but if you are still having problems fell free to ask.

Let us know how you go.

Blacky :grinning:

@cmartens

Nice one, glad your up and running.

Enjoy the blueprint.

Blacky :grinning:

Hey @Blacky, I’m just a couple weeks into a HA setup, but thanks for making so many useful prints! I was just going to share a possible add in that could make your charging BP more useful. I made an automation that monitors consumption on my smart plug and it is VERY accurate for turning off the charging around 80% (usually to +/- 2%). You just need to adjust the stop charging threshold up or down a wee bit and you can tune it in.

For example, I charge my Pixel Watch 2 to 80% in the morning and at night. It takes about 20 minutes and if I set it to turn off below 1.6w it is consistently from 77-82%, saving wear on the battery. I had tried using battery percentages, but few phones, and NO watches update their sensors frequently enough to charge to a state accurately.

Thanks again for sharing the prints!

Thanks @Blacky, I removed the blueprint and re-imported it via the button, but still get the error message in your second step. Let me know if I can help you debugging the issue.

@brickheadbs

Welcome to the community.

You welcome, hope it helps you get started with HA. In my opinion it is the best home automation platform out there.

I not sure what BP your referring to but I will PM you.

Blacky :grinning: