đŸȘ« Low Battery Notifications & Actions

@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?

Love the blueprint, thank you!

Two FRs:

  • Is there any chance labels could be added for exclude support? I have a bunch of extra entities and it would be nice to have one way to mark them as excluded
  • Notification Groups: I try to use groups as a layer of indirection between automations and devices. Otherwise when anyone in my family upgrades phones I have to go and find/find every automation that sends notifications to use the new device.

@Master_Nick

Hi Nick, can you provide me a snap shot of your batteries entities in developer tools. Below is an example of my fridge battery.

Blacky :smiley:

@EricD183

I am going to look into labels. I don’t really use them as it just looked like more work to me. Example if I needed to see what is excluded I have to go and edit the labels when I can just do it directly in the automation.

This is similar to labels as I don’t use groups. I just like to see who is getting notified in the automation.

I will however put them onto the list of suggestions. Thanks for reaching out.

Blacky :smiley:

1 Like