Turn Wifi on Automatically drain battery?

So I set up the first profile and when I was way out of range it still doesn't cut off. I see this pop out on the bottom when I scan my cell towers. Not sure how to enable it. Thinking that's why it wasn't working properly.
Do you know how to setup the tasks?
1.) New Profile -> State -> Phone -> Cell Near -> Scan and select all nearby towers.
1.1) New Task -> Net -> Wifi -> Set On
1.2) New Task to be set as Exit Task. New Task -> Net -> Wifi -> Set Off
2.) New Project -> State -> Hardware -> Headset Plugged
2.1) New Task -> Audio -> Media Volume -> Level 9.
3.) Sounds like something better suited for smartlock. Android Settings -> Security & Location -> Smart Lock.

I used to have phone stay unlocked when connected to wifi/bluetooth, but that required root and secure settings plug in. Haven't used that in some years.
966db9c6fc446548410779e48487dd05.jpg