Change home to connect device tracker

I use device tracker (nmap) to monitor my home network. I need to change “home” to “connected” when some device is connected. How can i do that? Any ideas? I’m breaking my mind trying…

You can wrap it in a template sensor, or switch it for a ping binary sensor with a device_class of connectivity