Automate Guest Mode with Pfsense

I want to be able to automate my helper for Guest Mode so the lights don’t turn off when I leave the house if a guest is home. Currently I have a helper boolean that I toggle manually. Unfortunately I usually forget to enable it.

I’ve tried to create and tracker entity based on a dhcp lease on my pfsense router. The problem I’m noticing is that pfsense doesn’t release the dhcp lease for a while so I can’t rely on it turning that entity on/off in a timely fashion.

Any thoughts on how to deal with this issue?

You could shorten the lease time on the pfSense router for the guest network but this could still be an issue to manage. Since I have a Unifi network, I use the Unifi integration to detect the number of connections on my guest network. This updates within ~30 sec. and does not depend on DHCP lease time.