To use this, Tasker needs to be granted permission to Write Secure Settings on your device
Install the Tasker Permissions app and follow the prompts.
adb shell pm grant net.dinglisch.android.taskerm android.permission.
If you're on a mac write
./adb shell pm grant net.dinglisch.android.taskerm android.permission.
Note: On some MIUI devices you need to enable the option "Disable permission Monitoring" under "Developer options" to be able to grant this permission.