Thank you. I’ll leave it as it is, the tablet is used from time to time. Then it is sometimes switched on for days and needs power from time to time. A warning message then makes sense.
And the display of unavailability doesn’t bother me as long as I know which device is meant.
I’ve been playing around with this, and recently had a Blink Doorbell Camera battery go dead. Unfortunately their battery entity is either “Low” or “Normal”, not a numerical percentage so it was not picked up. Any way that can be handled?
It should report you battery when the state is low. Just check that your Blink Doorbell Camera battery is shown as Battery.
I am interested in this so if you could check your battery in developer tools and maybe take a screen shot of it so I can look at it.
Blacky
Hi @Blacky, a brief scan of the blueprint code seems to indicate it only supports entities with device_class
set to battery
. Is that correct?
I am looking for a low battery blueprint that supports custom entities so that I can use things like compensation for batteries that misreport their values. My compensations report values with units of %
, but they do not allow setting the device class to my knowledge.
Thanks for the screen shot.
It is a binary sensor and binary sensors have an ON / OFF state but home Assistant reports them in the UI with a nice name depending on their device class. For a battery that would be ON = Low and OFF = Normal. Here is a link to Home Assistants website that list binary sensors and what they will look like, click here.
You doorbell battery is in the ON state so in the UI you will see it as LOW. You have the correct device class so this blueprint should find it and report it whn it is ON / Low.
Maybe if you 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
Yes.
Yes, but you can still assign a device_class
(and other attributes) by using a template sensor based on the compensated sensor.
template:
- sensor:
- name: "Your Battery Name Here"
unit_of_measurement: "%"
device_class: battery
state: "{{ states('sensor.your_compensated_sensor_here') }}"
Or if you just using helper for a template sensor and then just use this in the state template. Then fill out the other inputs.
{{ states('sensor.your_compensated_sensor_here') }}
It is a sensor > compensated > back to sensor. Would be nice if HA just had a device class in compensated sensor. Maybe put it to them… seams like an easy update for them.
Edit: I asked for the feature, click here & Vote.
Blacky
I’m relative new to HA and hope someone has an answer. Because my HA isn’t public avilable I’m using a self-hosted “ntfy” application and want to include details about which device has which battery level. Is there any variable or something similar I can use in my custom-action?
Thx @Blacky. Don’t know how I was able to miss it.
I have an improvement Idea, it would be nice if there would be an option wich only sends the OK notification if the automation is triggert with the Button, but not with the timed trigger.
Sorry I was traveling and did have a chance to try anything for a few days. After excluding the hardwired Blink cameras that always report low battery (I assume a bug in the integration), the script is working as expected.