Apple ipad battery status not updating

I have 2x apple ipads and 2x Android phones. And I setup automation to monitor charge status of ipad. When it reach 98% for 5 mins, it will trigger and turn off a smart power switch to stop charging. It works great on HA core version 2023.9.3 (docker) . After upgrade to HA 2023.12.1 on docker. The automation seems not picking up. Menual test works ok. I watch the HA ipad battery level status, that is what I am using for monitoring, and find out the battery level of ipad seems not update for a long time. Only doing once when you access HA on ipad. on ipad I checked HA app. it is latest version. And settings are enabled for location, background update and etc. Where should I start looking for to solve this.

2 Likes

I have the same problem. The iPad does not update the battery charge level in HA.

It went from 100% to 0% over the course of several hours without ever updating HA even once, and it blew right past my ā€œ25% level turn on charger switchā€ automation. I’m on the latest iOS companion app (from 2023/12/27) and HA core 2024.1.2.

2 Likes

Same issue here.

I wonder, over those hours did you interact with HA on the iPad at all?
Maybe it only sends updates if there’s ā€˜activity’?

not sure. I set HA app on ipad background fresh enabled. And if you manually open HA app. It send status back to HA core

I found a workaround for this!
Started digging in iPadOS and found the shortcuts app which allows you to execute actions on the device based on triggers. And I found that one if the sections possible was the refresh HA sensors action. It does exactly what we want and sends updated sensor values for the iPad to HA, the only nuisance was that the triggers are pretty limited. I wanted to set it up to run every X minutes for example but the only time based triggers available were sunrise, sunset, or once daily.

So instead I got the iPad to refresh sensors on trigger of whenever it is connected to or disconnected from power, then set up a home assistant automation to toggle the switch the iPad’s charger was connected to every 15 minutes. It was a little convoluted but it worked!

The only downsides were that the switch I’m using makes an audible click whenever it turns on or off which was a little annoying but I got used to it, and

If you set the interval too short it can end up sending too many updates. But I found 15 minutes was plenty frequent enough to keep my iPad charged to about 80% ±2

Frustratingly my iPad started crashing out of apps a week later but I don’t have a reason to think it’s related.

I hope this helps someone!

I’ve been using an iPad mini 4 by the way.

1 Like

I have another work around to use smart plug with output energy monitorring function. So I can use smart plug current data to decided if ipad is fully charged or not.

1 Like

Use notification command - request_location_update. This will refresh the sensor data.

1 Like

The request_location_update function apparently drains too much battery. However, I found a very good solution using Apple’s native iOS Shortcuts app, similar to how another user utilized the automation feature.

With it, you can trigger an automation when the battery drops below a certain level (e.g., <25%) or rises above another level (e.g., >75%). This automation can then send a POST request to a specific URL using the ā€œGet Contents of URLā€ action.

The URL is a webhook I created in an automation within Home Assistant. There, I set up two automations—one to turn my smart switch on, and one to turn it off. These two webhooks are used in the iOS Shortcuts automation. (In Home Assistant, you can also configure the trigger settings to accept different types of requests, such as GET or POST.)

This setup is working flawlessly for me and helps maintain my battery between the optimal 20% and 80% charge range.