Precense and advanced flow with Ubiquiti

I created every user in Homey. You need seperate email addresses for.
If you have the users in Homey, you can set the user state via flows.

Here are example flows:

I use a timer to prevent too fast reaction on disconnects to prevent state changes in case of access poit roaming.