So I happily set up my "Home" and "School" profiles using a "Wifi Connected" toggle (Wifi Near seemed to have issues for me), but I have the following problem. I'd set my data to turn off after 15 minutes when the phone is asleep in the interest of saving battery, but then my wifi disconnects and the profile shuts down. I can't really use a location context, since my home and school are fairly close (within the error reported by my network). Anybody have any good ideas for getting around this?
What issues were you having with Wifi Near? Maybe we can work on resolving that?
To stick with your current approach...
Profile 1
Context: Wifi Connected <school>
Enter Task:
Variable Set %ATSCHOOL 1
Exit Task:
Variable Clear %ATSCHOOL If %WIFI matches on
Profile 2
Context: Variable Value %ATSCHOOL = 1
Enter Task: <settings you want>
Profile 3
Context: Variable Value %WIFI matches on
Enter Task:
Wait 1 minute
Variable Clear %ATSCHOOL If %WIFII Doesn't Match *<SchoolSSID>*
When you connect to your school Wifi, the %ATSCHOOL variable will be set to 1, causing profile 2 to activate, setting the settings you want.
If you disconnect from your school Wifi while Wifi is on, the %ATSCHOOL variable will be cleared and profile 2 will exit - causing Tasker to restore your settings. If you disconnect because Wifi is off, then the variable won't be cleared and profile 2 will remain active.
After Wifi has been off, when you turn it back on, profile 3 will become active, and if you are not connected to your school Wifi within 1 minute (you may need to adjust this time), the %ATSCHOOL variable will be cleared, causing profile 2 to exit and Tasker to restore your settings.
This series of profiles basically ignores the fact that you're disconnected while Wifi is off, and gives it a minute to reconnect after turning back on before it determines if you're still at school.