ok I will. What could be the reason your package only sees my second remote and creates a battery sensor for only that, leaving out the first (which is unnumbered)
just to be clear, the first 2 entries here are the 2 devices irl, the bottom _battery is created by the package , obviously based on the second device.
I looked at doing what @firstof9 suggested, but there isn’t an easy way to determine what created the battery sensor. Since this is an edge case, I decided to implement it in a different way. To prevent creating a battery sensor from an entity, you can now use customize to set battery_sensor_creation_disabled to true. You’ll need to clear the retained MQTT topics to delete the duplicate sensor.
Either sensor.tradfri_remote_control has “battery” in its friendly name or there hasn’t been a state change yet to trigger the creation of the battery sensor.
This package and icon_templates are mutually exclusive. Either you manually create templates for every battery device or you let this package automatically create them all for you without the fancy icon. The primary goal for this package is to avoid creating templates.
Sorry for this dumb question, what is the significance of time trigger? would it only create a notification at the above said time? so if my battery goes down the 40% mark at 16:00, would i come to know at 18:00 (the next time trigger?
Yes, it only sends slack notifications at 10:00 and 18:00. A battery that drops below 40 at 16:00 would cause a notification at 18:00 and every day at 10:00 and 18:00 until that battery level is above 40.
Excuse me, I’m a newbie…
I installed your package in my Hassio following your instructions… but in the dashboard it do not show me any “Battery Alert” section… what is wrong?
I have to add group battery_alert manually in configuration.yaml to see it… is this correct?
Is it correct, that the package should create new sensors for the battery levels? Because there are no new sensors available on the state page
There are no alerts shown for any sensor with a battery_level attribute unless I put battery in the friendly name of the sensor. But then the script assumes that the main value of the sensor (e.g the temperature) is the battery level, right? So is the issue, that no new sensors are created and therefore no sensors with battery in the name are found? How can I fix that?
I’ve been using this for a while and at the weekend I had 2 Fibaro sensors go from 100% to not working, battery’s were totally flat. Plus I have another that always say 0% even with a new battery.
I just find their reporting far too flaky to be of any use for battery levels.
Is the battery_alert.yaml file stored in the folder named packages?
It will create a new sensor for entities that have attributes named battery_level, battery, and battery numeric. If the entity has battery in it’s name, it will not create a new sensor from it.
Correct, the alert will be for the battery sensor which are automatically created for entities that have battery attributes.
Is there any way to store the min & max alert threshold value thats set from the input_number persistent in mqtt, to not have the value reset to initial value after reboot?
With the release of Home Assistant 0.66, it’s now possible to set the icon for a sensor via MQTT Discovery. I’ve updated the package so it sets the icon to a battery icon. I was hoping to make the icon change based on battery level, but Home Assistant only sets the icon when the sensor is initially discovered and on startup, which doesn’t make that feasible yet.
Once you update the package on your system, the icons won’t change immediately. There needs to be a state change or poll for each device first, then Home Assistant will need to be restarted. After that’s done you should now have battery icons.
First with the bad news. With the upcoming 0.69 release of Home Assistant, there is a breaking change where this package will cause problems with MQTT component in Home Assistant.
Now for the good news. To prevent an issue with the upgrade, you must update the package to the latest version then wait long enough for every battery device to report it’s latest battery level before you upgrade to Home Assistant 0.69**.
For some even better news, with 0.69, it’s finally possible to dynamically set the icon based on battery levels. The latest version of the package enables that feature so once you upgrade, you’ll have dynamic battery icons.
Lastly, for anyone that’s too impatient to wait for the package to fix the issue before upgrading. You accelerate things by installing the new package, restarting Home Assistant, uninstalling and reinstalling the MQTT addon (to purge retained data), then proceed to upgrade Home Assistant. Your battery sensors will automatically get recreated as they report in.
Thank you very much. Mine keep reporting the old memories of battery.
example.
Yesterday my battery is 44% report.
Today my actual battery is 90% but still keep reporting that it is 44%