🪫 Low Battery Notifications & Actions

Just set this up - works flawless!

One tricky thing though (and mentioning it for others): seems that when selecting the excluded group or custom group, “labels” cannot be used either, only the entities themselves directly. The documentation is mentioning only not to use “areas” or “devices” for the selection.

Could be a nice addition to allow (entity) selection via labels - it is much easier to select and tag a couple entities with a label, instead of editing the automation and adding each one individually. Also, this label can be reused in other places, therefore no need to keep the selection in sync in multiple places.

@mooisjken

Thanks for your kind words.

Thanks for reaching out and for the heads up :+1:. I will need to go through my blueprints and update the descriptions but it does say that " NOTE - You can only use entities. Areas and devices are not supported". “Labels” was added to blueprints HA 2024.4. I normally wait about 3+ months so everyone has time to update before I break a BP for those who haven’t updated yet. Agree I will need to look into “Labels” further and see how they can be used.

I will put this on my list to do :wink:

Blacky :smiley:

New Update 2.2

:rocket: Stay Charged, Stay Smart! Let’s automate and take charge of your battery maintenance! :battery: :zap:

Maintenance :toolbox:

  • Update the description in “Excluded Battery Sensors” and “Battery Sensors - Custom Group” to include the new option to select “labels”. The updated description should read:

    NOTE: Only entities can be used. Areas, devices, and labels are not supported.

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:

@Blacky Thanks for this amazing blueprint! Is there a way to target a notify group instead of a hard-coded list of devices?

@jsamr

Hi Jules, and welcome to the community.

I decided not to go with groups because I just wanted to go into the automation and see who is being notified. I find this easier to manage.

For me to understand more… why would you like to use groups and not just quickly set up your automatons selecting devices?

Blacky :smiley:

Blacky

@Blacky Thank you for your response :sparkles:
I am trying to organize notifications by “roles”, so that anyone interested in the household can “join” a group. For instance, low batteries is the “maintenance” group ^^ I find it neat that way, but can live without!

1 Like

Hi! Firstly - wow this blueprint is awesome!

I’m having a minor issue where it’s reporting some phantom devices (presumably something I used once upon a time and didn’t delete when I pulled it out of the system) but I’m not gettting “Battery is unavailable!” messages for two devices without a device name (to go look into)…

I’ve attached a screenshow - @Blacky or anyone got any ideas where I can find out what these devices are? Thank you!!

And thank you again @Blacky for sharing such an awesome template!

@bkch01

Thanks and I still have more to come.

Yep, go into settings > device & services > Entities tab at top > in the search type ‘Battery’ and you should see all your batteries pop up. The BP reports the friendly name but look for the ones with the red warning. You should see 3 of them. Then you will have to act on what you would like to do with them, delete, replace battery, reconnect, etc.

Blacky :smiley:

New Update 2.3

:rocket: Stay Charged, Stay Smart! Let’s automate and take charge of your battery maintenance! :battery: :zap:

New Feature :new:

  • 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.

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

I don’t quite get what’s the point of the Cancel Action Button. I would expect it to remove the notification. On my Android device I can press the button, but nothing happens. I would also like to not have the Cancel Button as swiping the notification already removes it. Maybe make it optional?

Also may I suggest to add an option to add the current time as due date to the to do entry?

@EarMaster

The automation is waiting to see what you would like to do (listening). If you push the cancel button then it knows what you would like.

If you choose the “Add To-Do List Action Buttons + Confirmation Message” Then when you push the cancel button you will receive a confirmation message.

Normally when you choose this option 9 times out of 10 you will push the ‘Add To To-Do List!’. Again when selecting “Add To-Do List Action Buttons + Confirmation Message” and you push the ‘Add To To-Do List!’ button you will receive a confirmation message. If you click on the confirmation message it will take you directly to your chosen To-Do list. You then can click on the task and add your due date.

Blacky :smiley:

That didn’t work for me. I pressed Cancel several times and nothing happened. In the end I just swiped the notification away.

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:

alias: Batterielevel
description: Überprüft regelmäßig den Batterielevel und erzeugt Tasks zum wechseln
use_blueprint:
  path: Blackshome/low-battery-notifications-and-actions.yaml
  input:
    to_do_list: todo.allgemein
    include_time: time_enabled
    time: "16:00:00"
    weekday_options:
      - mon
      - tue
      - wed
      - thu
      - fri
      - sat
      - sun
    include_easy_notify: enable_easy_notify
    notify_device:
      - 676fd4d19422dee4caea8c99b8c4c592
    notify_title: Batterielevel niedrig
    notify_okay_message: Alle Batterien in Ordnung!
    notify_action_buttons: enable_to_do_list_button
    to_do_task_title: 🔋 Batterie ersetzen
    action_button_to_do: Task erstellen
    action_button_cancel: Abbruch
    action_button_confirmation_title: Batterieaufgabe erzeugt
    action_button_confirmation_message: Batterien mit niedrigem Stand wurden als Task erstellt.
    cancel_action_button_confirmation_message: Alles in Ordnung!
    include_persistent_notification: disabled_persistent_notification
    exclude_sensors:
      entity_id:
        - sensor.pixelchen_battery_level
        - sensor.sixpack_battery_level
    include_custom_actions: disabled_custom_actions
    notify_message: sensors

Thanks for your help!

@EarMaster

Please select this option and test again.

Blacky :smiley:

Hey there, very nice work!

Currently I have the problem → that it does not find any untis with battery at all.
And that where I have 15+ devices which I find under “Settings” > devices & services > entities > search type Battery.
But mostly all are incoming via MQTT / Zigbee2Mqtt.

Did I miss something? :slight_smile:

@Master_Nick

Hi Nick, and welcome to the community.

Could you go into developer tools > states and search for one of your batteries entities and see if in the attributes that they have a “device_class: battery”

Could you also 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:

Now, after pressing Cancel (I have one device with low batteries at the moment) it adds another notification with the cancel_action_button_confirmation_message string, but the original notification persists. Shouldn’t it disappear once I select an action?

@EarMaster

For Android device I made it sticky so you will have to swipe it away. I wish I had that for IOS. Try using the to-do button adding to your to-do list and then when you get the confirmation message if you click on it it should take you to your to-do list so you can set your time.

This is designed if you are notifying more than 1 person so the other person knows what happened. For you because your just notifying you, the cancel you will probably just swipe it away and the to-do will be used.

Enjoy

Blacky :smiley:

Hey there,
thanks for the fast reply :slight_smile:

Well :sweat_smile:
“no entity found” for “device_class: battery”

This seems to be the point. The Zigbee2Mqtt integration brings the batteys up as:
sensor.bathroom_motion_battery or sensor.bedroom_sensor_battery via MQTT.

At this point, I think we can skip the yaml right? :smiley:
But is it possible to capture the states of those batteries?