我可以确认它与SSID相关，我创建了一个简单的配置文件，只有在"SSID" 字段中没有将任何名称放在"SSID" 字段中，如果连接WiFi，则会在"SSID" 字段中。 SSID仍然是灰色的配置文件。
After I changed my device and import the tasker's profiles from the old Samsung to the new one (Huawei), the "Wifi connected" state can't recognize the SSID any longer.
I can confirm it's related to the SSID, I've created a simple profile detecting WIFI state only, and if I don't put any name in "SSID" field, the profile get green when the wifi is connected, and the profile with SSID still gray.
And it's also strange that, some times, while a turn on the wifi, the profile turned green, and maybe one second or two, it turns to gray again.
I think we're going to need some more information; always good practice whenever troubleshooting any system, look at the log files.
Switch on logging for Tasker using the instructions here: https://tasker.joaoapps.com/userguide/en/faqs/faq-how.html#x2
Set up your profile with no SSID name so you get a green profile, toggle the wifi off and back on again, then look at the log file.
Then set up your profile with your failing SSID name, toggle the wifi again, look at the log again.
Are there any obvious differences or error messages which start to point us in the right direction?