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?