Occupancy Question and Using Android Device Manager

I have attempted to install AutoVera and Android Device Manager to complete a task. I want to monitor two Android phones and their away/home status (connected to WIFI). If both devices are away then I would like to execute a scene (turning lights off etc). Can anyone advise on how to accomplish this?

I am also having issues with Android Device Manager. I am able to select the WIFI and the variale container. However when I attempt to select the virtual switch it does not allow me. The “android device refresh” is there to be selected, however when selected it doesn’t change back to the standard color.