Does every sensor have a battery_level attribute to use for Automation?

Hello everybody :wave: ,

I want to automate a few covers and sensors for the window-position, so the covers and windows do not damage each other when opening and closing automatically in the morning and evening.

I’m quite new to HA, but I already set up a RasPi and simulated a binary_sensor for the window-position and a cover.
Also I developed automations to open the cover in the morning and close it in the evening (IF the window-sensor says, that the window is closed).
Even SMTP-Mails are sent, if the window is open in the evening.

My only problem left is how I can make sure, that the cover will never close, when the sensor-battery goes empty some day!

Cause this would be a pretty expensive mistake…

Now I wanna order my first real physical sensors and I want to buy sensors that do report the battery_level, so I can use it for an SMTP-Mail-automation to notify for changing the battery.

So my question is, does every battery-powered-sensor actually report the battery_level-attribute, or are there differences between z-wave, zigbee and WiFi or even cheap and expensive sensors?

Or do you already know good WiFi-sensors which report the battery_level?

I think I can only use WiFi-Sensors, cause my home is a long building and there are long gaps between the covers, which I wanna automate. Maybe to big for Z-Wave and ZigBee. But I do have WiFi-repeaters.
For the cover I wanna use Shelly2.5.

thank you all
Greetings Peter :slight_smile:

The key here is you asked ‘does every’

There are few absolutes. Devices support what they want.

Now do Most? Yes most battery powered sensors provide information on battery levels.

The problem is its RARELY anything close to accurate and ‘depends’ on a ton of variables. You can’t just get a ‘oh there’s 5% remaining’ reading and call it a day.

Ive got some sensors three years old still running on the same coin cell battery and reporting accurate status while another identical sensor 5 feet away went through three batteries in that same time AND both sensors report 25% remaining through the whole thing…

For this reason I use battery info as a guideline and dont set any notifications notices or the like on a battery sensor until i know exactly what its telling me (keep battery percentage remaining when you replace the battery and you’ll start to find what ‘empty’ actually is for said device.

Finally if battery is important you dont want WiFi devices. Zigbee and ZWave were designed for low power battery friendly deployment. Wifi… Not even close. A wifi sensor will burn an order of magnitude more energy than a Zigbee sensor of the same type in the same location purely running the radio. I do realize for your install that may mean a hub and repeaters. Abd because of this wifi may still make sense for you. Just realize you’ll be going through a lot of batteries.

Zigbee and Z-wave both have builtin reapeater functionality of powered devices, so maybe it would be smart to use these and then just add a few plugs between as repeaters to extend the range to the entire building.

Wifi is not a solution.
I have tried it on a 16450 battery and that last only 3-4 months with just two updates a day, and that is with the important limitation that this is a push-only solution, so HA can not pull state of sensor, nor battery level. The device transmit these at set intervals.

You also have to take into consideration that batteries are designed to output voltage for as long as possible and then give up abruptly, when it is spent, so with a setup as above you might not see an update from the sensor in the period with the voltage drop and the only way to discover it is when it misses a check in.

Checking the battery without sending the info a bit more often is an option, but each check will wake the device from deep sleep and take roughly 1/3 of the complete check in process, so it is not really that usefull.