Home Assistant, Unifi and Kids Internet Access

I setup the Unifi integration in Home Assistant. I’m using it to turn the kids internet access off at bed time and back on in the morning. Turning off access works fine, but the turning back on doesn’t seem to be working reliably. The Unifi interface shows their devices are blocked during “no access” and the next morning their devices appear unblocked, but they can’t connect to WiFi. If I toggle the Home Assistant button I made off and back on then they can connect. My daughter’s tablet needs this “fix” every day and my son’s tablet is about 50/50.

I’ve tried adding the off and back on toggle to the morning automation, but that didn’t fix it.
If I leave the Unifi interface webpage up, when I get home from work, I have 100+ “ghost devices/kids tablets” listed instead of the usual 15. Refreshing the page removes the “ghosts”.

Has anybody else seen this or know of another way to automate internet access and have a switch for instant off when needed?

I have never tested it with Home Assistant have you considered using the WiFi Scheduler that UniFi has built in and see if the problem exist there?

Thanks for the reply. The kids are on the same SSID but being different ages they go to sleep at different times. I will try scheduling through the Unifi interface to see if it’s better at turning the internet back on. Then I’ll only need to use the Home Assistant “switch” when they’ve been baaaaad!