Bluetooth WiFi on/off

Does anyone know why this won’t turn my WiFi or Bluetooth on? Sometimes it will turn WiFi on but it never turns Bluetooth on.

https://www.icloud.com/shortcuts/be1bbcc114de40ca9f638827b7459674

How are you executing it? If I’m not mistaken, only certain actions will work when the Shortcut is ran via Siri, Spotlight widget menu, or through the Shortcuts app itself.

I know this looks ridiculous, but with your wifi and Bluetooth off, is there any chance that the following sequence of actions works for you?

I’m triggering it from the widget or I also have it added to the home screen, it’s in both places…

@sylumer I did what you said and it said “an unknown error occurred while performing the request “ the first time I ran it and now it’s not saying it anymore. Also seems like it’s turning on and off like it’s supposed. Hopefully it keeps working.

Does it matter what order you put stuff in the shortcut? Such as send a text message first, turn WiFi on or off, get directions,?? I understand it might matter for some but I think think it’s pretty cut and dry but I’m not sure.

It should keep working, but then again this double toggle shouldn’t be required. My best guess at this point is it is an initialisation issue in Shortcuts. That guess was exactly how I came up with doubling the steps.

Yes, no and maybe :smirk:?

Obviously in most cases algorithmic sequence is critical.

Sometimes there are sets of actions that can be arbitrarily ordered up to and in that they must be auctioned by a certain point in the algorithm.

When it comes to things like this, where the behaviour is unexpected and not in line with the logic of how you would expect the processing to take effect, we’ll, maybe. It depends on the root cause rather than the symptom.

@sylumer have you had to do that before for other shortcuts, what you showed me in your screenshot above?

Seems like it mostly has trouble with the Bluetooth but the way you showed me is good so far.

Shortcuts, no. Other programmable applications I’ve used, yes.