YAWA - Wifi Automate when near cell tower and AP
sourceThis is Yet Another Wifi Automater using minimal battery use. It is similar to:

However with some key differences:
1. By default it comes with support for two access points (e.g home and work). Easily modified for a different number (e.g. 1, 3, 4 access points)
2. It disables cell tower and "wifi near" scanning when connected, as these contexts aren't needed when already connected.
3. If the cell tower goes out of range or drops signal, Wifi remains connected and isn't affected.

Point 2 is particularly important. Tasker lists the below feature under "future plans" (http://tasker.dinglisch.net/todo.html):
"wifi near: if connnected to an AP and all wifi near states match it's details, stop scanning"

This suggests that even if connected, Tasker will continue to scan for wifi networks if a "Wifi near" context is active. These set of profiles will disable both cell tower and wifi near profiles if and when connected to wifi to further reduce battery usage.

Cell Network A Profile
Cell Network B Profile
Wifi Connected Profile
Wifi Near A Profile
Wifi Near B Profile

Import each of the above profiles and modify the "Cell Network" and "Wifi Near" profiles to your appropriate cell towers and Wifi APs.

If you only need the one access point - you can delete the "B" set of profiles and delete any references to them in the "Wifi Connected" profile. If you need more access points, just copy the profiles from A or B and edit as appropriate.

These set of profiles use some more advanced techniques than the "step through" version. When connected, only the "Wifi connected" profile is active, and all others are disabled. Exit tasks are required on the "wifi near" profiles to avoid Tasker turning off wifi when those profiles are disabled.

Tested on Tasker 1.0.17

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License