You're going about this the wrong way.
Go to Profiles → (New profile) → State → Net → Wifi Connected. Leave SSID
blank and tick "Invert". Link this profile to a task which changes brightness.
Edit - Okay, I think I've found the solution. In the task which changes brightness, do this:
Wait
for 5 seconds
if %WIFII
(matches regex) \bSCAN\b
Explanation: The %WIFII
(WiFi info) variable not only gives the name of the WiFi that you are connected to, but also miscellanous information such as Mac and IP address and contains the phrase ">>> CONNECTED <<<". If you are not connected to any particular WiFi, it lists all of the WiFis available along with the phrase ">>> SCAN <<<".
The above task basically
- Waits for 5 seconds (adjust accordingly!)
- Checks if the
%WIFII
variable contains the word "SCAN" by means of a regular expression
- If it contains "SCAN" it means that the device is NOT connected to a specific WiFi (if was connected, it would have the word "CONNECTED" in it).
- Increases brightness accordingly
Note: Might cause problems if there are WiFis with the word "SCAN" in them! You can always change the if
condition to something else such as if %WIFII (doesn't match regex) \bCONNECTION\b
, or make it more specific for the phrase ">>> SCAN <<<" (I'm still new to regular expressions so I've no idea how to do it).