This package is phenomenal. It caught all my zwave blind, remote, and lock battery levels. Even electric car battery and phones. I also have Wyze sensors and once I let it run the ācreate battery sensor from attributesā automation to create them I am now unable to send/receive the notification and getting the following log error:
2021-01-05 12:26:03 INFO (MainThread) [homeassistant.components.automation.battery_persistent_notification] battery_persistent_notification: Running automation actions
2021-01-05 12:26:03 ERROR (MainThread) [homeassistant.helpers.condition] Error during template condition: UndefinedError: 'None' has no attribute 'attributes'
edit: I noticed that the error is only on the persistent and clear automation. I looked into those and saw it references the group of batteries that the package makes. I had that automation turned off. After manually executing it, the group was updated and now I receive notifications again. Iāll leave that one on.
Now to remove batteries I donāt care about. Thanks!
First, let me thank you for this script. It is something that should be IMO a part of the core HA system.
Iāve got it running and everything seems to be working fine, Iām just struggling with one thing. I have a few entities that contain āBatteryā in their name, but they donāt really represent battery percentage (or level) value. That includes entity called sensor.sm_g965f_charger_type (is it the word āchargerā that triggers its inclusion?).
Anyway, Iād like to exclude these entities from being processed by the script. I canāt use battery_sensor_creation_disabled, because they are not generated by the script. And I canāt find counterpart of this configuration element for real entities. Is that even possible, or is there a chance that it could be added? Or is there some other way how this could be done?
Just add your real entity & the new attribute flag for battery-alert to your customize section in configuration.yaml.
I have my customize: broken out into customize.yaml
Iāve added those attribute flags there like soā¦ configuration.yaml:
####################################################################
# Configure a default setup of Home Assistant (frontend, api, etc) #
####################################################################
default_config:
homeassistant:
customize: !include customize.yaml
And in the Developer/States view I can see that the attribute was correctly set:
But I still see it among the sensors being monitored (it is in the list displayed after I click on Battery Status label created by the recommended Lovelace yaml snippet).
Do I perhaps need to somehow manually remove the sensor from the list of monitored entities?
I have not been working with the HA for very long. I just have a question.
I cannot set a time anywhere when testing for the status of the batteries. When does this happen? Is it true that if the battery level falls below a certain percentage that a message is passed on?
Hello everyone,
First thanks @NotoriousBDG for this, itās great and I hope one day something like this will be implemented in the core of HA.
I do have one question, maybe because I havenāt completely understood how this whole system works.
In the group.battery_status, I have many duplicates. All my aqara sensors appear twice, first the zigbee2mqtt entity, and second the mqtt entity created by this script.
Is it intended ? Looking at the automation code for the group, it seems to pick up every entity with anything related to battery (attributes, icon, name, id, etc)
Does the system need it own entity to work ?
Or can I just ask him to not create a sensor for those entities that already have one ?
I recall there was a change in HA core sometime in 2020 that autogenerated battery entities for the xiaomi integrationā¦ you can disable them if you want - AFAIK they are only used in the config->integrations-> devices page. Or delete the package created ones and use the auto ones.
Iāve got the package generated ones for my xiaomi integration and auto generated ones for my other zigbee - they all show in the battery group
Hello I added the Battery_allert.yaml. However, my Homamatic devices only show 2% battery. Where or do I have to adjust something so that the values āāare displayed correctly
Is there an easy way I could exclude the low_battery_level values from this package? They are being detected for a lot of my devices instead of the correct value. Iām going to look into this soon but figured Iād ask if anyone has any advice before digging in too much.
I get this part, the only problem is that itās around 30 devices with this issue and with every device I will add in the future, it will grow. I know not a lot of people are running the new zwave add-on so Iāll probably be looking into this soon.