I’m a little confused by what you are asking for, because when I make the change I posted for line 80, I see all the devices with a battery level below the threshold and their % levels:
Hey Stefan, I´m currently facing the same issue with my homematic devices. Therefore i would like to try out your contribution. Unfortunately i´m not sure under which document /where to include your code snippet. A small tutorial or an additional screenshot would be much appreciated.
Thank you very much in advance!
Hi, thanks for your blueprint, useful to know which battery to change. But I only get empy notifications, {{names}} doesn’t seem to return anything. What am I doing wrong?
Hi, this is an amazing blueprint. I just installed it and it works so easy!
Is it possible to extend this one blueprint to also include disconnected devices, even when they are not battery powered (or they are but the battery is not low)?
Or does anyone know of a similar automation/blueprint for disconnected devices?
Kind regards,
Patrick
Before making any changes, note that when manually running the automation, if no battery sensors are below the threshold then no names will be returned. So testing can be confusing if you don’t have any low batteries at the time of test. Manual running automations skips the conditions!
A quick way to check is to adjust the threshold to 100% before running the automation, which should result in all your battery sensors being returned with their levels. Once you are happy this is doing what it should be, turn the threshold down to what you want.
Hi, thanks for the useful blueprint.
However lately I began to receive notifications from an entity with a low battery, however I can’t find which one it is. I added {{sensors}} in the notification but nothing shows up. Is there a way to find out which entity that triggers the automation?
I’ve installed Tykeal’s blueprint, but I got a small problem, despite having new batteries, some zwave devices just keep coming back in the notification as having 5% or less battery left and some zigbee devices just don’t show up, am I missing something in the setup integration of the blueprint and setup of the automation?
Thanks
alias: Low battery level detection & notification for all battery sensors
description: ""
use_blueprint:
path: tykeal/low-battery.yaml
input:
threshold: 5
actions:
- service: notify.xxxx_hassiobot
data:
title: Notification de(s) pile(s) à remplacer
message: Les piles de "{{sensors}}" doivent être changés
exclude:
entity_id:
- sensor.iphone_battery_level
- sensor.ipad_de_al_battery_level
- sensor.iphone_se_de_battery_level
I can’t really speak towards the devices that aren’t showing up, outside of checking to make sure that they do have a battery attribute.
As for devices that are above a specific threshold but still show up, if the device has a low battery attribute that is reporting that the battery needs to be replaced that could do it. I’ve got a zwave device that doesn’t always clear that bit when I change the batteries and I have to force it to re-interview to get it to clear.
Thanks for that, the re-inteview seems to have done the trick, concerning the ones not showing up they do have a battery attribute, I’ll keep digging around to see if I find anything.
i have a lot of devices, (e.g. Sonoff Snzb, mobiles, etc. ) but don´t get any sensor displayed. The message arrives on my mobile, but besides the title all is empty. eben when i set threshold to 100% .
Any idea what i´m doing wrong?
This is what i get as error:
UndefinedError: ‘homeassistant.util.read_only_dict.ReadOnlyDict object’ has no attribute ‘device_class’
Im getting a response on my mobile, with the title, but no sensors are listed.
The logfile shows that there are some sensors found with the condition. but they are not listed.
Step-Details:
Result:
params:
domain: notify
service: mobile_app_pixel_7_pro
service_data:
message: Batteriestatus
data:
message: |-
Batterie wechseln
⦿ Overview Batterie (0%) in area Buero
⦿ Hue Schalter Battery (22%) in area Wohnzimmer
target: {}
running_script: false
Trace-Timeline is also ok:
triggered manually at 20. August 2023 um 21:22:04
Aufruf eines Dienstes ‘Benachrichtigung: Send a notification via mobile_app_pixel_7_pro’ von
Finished at 20. August 2023 um 21:22:04 (runtime: 0.62 seconds)
Thanks so much for this Blueprint.
Request: As I have over 100 battery driven devices not named after their location it would be very useful to have the possibility to additionally add the according device’s alias area to the battery low state notification.
Would that be possible?