pantherale0 / ha-familysafety

Microsoft Family Safety Home Assistant integration
MIT License
5 stars 1 forks source link

Manage screen time requests #33

Open manonstreet opened 4 months ago

manonstreet commented 4 months ago

Checklist

Is your feature request related to a problem? Please describe.

No

Describe the solution you'd like

Provide a means to grant additional screen time for an account. Surface new screen time requests on a per account basis.

Describe alternatives you've considered

N/A

Additional context

I use Microsoft's Family Safety to manage my kids screen time. Although they are on a established schedule, there are many times when additional time is needed. This process involves requesting time on their computers when it runs out, opening the Family Safety iOS app, opening the notification, and selecting how much additional time to grant.

Ideally, the need for the Family Safety iOS app could be eliminated through use of this integration. Signaling a screen time request (event, boolean change, etc.) would allow for creating an actionable notification to grant additional screen time with one click.

manonstreet commented 4 months ago

I was poking at the base python module code and see it already has the ability to get pending requests, and to approve pending requests (with a variable number of seconds).

Can this integration be extended to:

  1. Check for pending requests in the update interval loop (looks like every minute). As noted this can be exposed via a sensor (such as pending request boolean).
  2. Provide a way to manually trigger an update. This can be helpful when the kiddos run out of time at some critical moment in the game (I need to save! I am a about die!). They will request, and urgently ask for more time. I'd like a way to not have to wait for up to 1 minute before I can process the request.
  3. Provide a way to approve/deny the request. This is probably best done with a service.

Thanks!

pantherale0 commented 4 months ago

Yes, the code is there. Will enable it as an experimental feature as it's not fully tested yet (especially with new version of family safety).

manonstreet commented 2 months ago

Hi @pantherale0, curious when you might able able to implement this?

Thanks for your work on this integration, I use it daily!