Track screen time for Apple devices

Hello world,

As I’m reluctant to throw devices that were expensive, I’m giving my old iDevices to my kids.
Obviously they are abusing the time spent on them.
For newer devices, I ask them to show me the “screen time” from time to time but this doesn’t exist on the oldest of my iDevices.

Is there a way to retrieve screentime on newer devices inside HA?
And for older devices: Is there a way to compute screen time and get it into HA?

What I did:

binary_sensor:
  - platform: ping
    host: 192.168.0.16
    name: chloe_ping

But this was too easy of course. iDevices are reported online even when the screen is off. Whether because of the device querying the web from time to time to check for updates/notifications/… or because of some apps that keep interraction on the web when in the background.

So, this is not the solution.

Any idea, please?

Hello, have you found any solution?

Unfortunately no, never …
All those manufacturers should provide a way to get screen time centralized, I don’t want to go through all their apps to sum up the time.

Like Nintendo is providing the screen time of all the switch but you need the app.
Even Apple, if you have everyone on your family account you can see it.

I wish someone would have picked up and reverse engineered the Apple API (sounds crazy but who knows)