How to automate 'Guest Mode' based on nmap?

I’ve managed to set up nmap tracking for a guest wifi network on a different subnet to HA. What i’d now like to accomplish is that any time HA sees that a device is connected to this guest network, it flips a input_boolean to activate a ‘Guest Mode’ thereby changing the nature of some automations. And then when there are no devices on the guest network, everything goes back to normal.

I’m struggling to figure out how to trigger the automation to look for devices on the guest network. Should I do this with an Event trigger? And do I maybe need to make some kind of group that everything tracked by nmap on that subnet is added to?