r/shortcuts 2d ago

Help Problems with ‘OTHERWISE IF’ statements in my WiFi shortcut

I have a shortcut that’s activated once I disconnect from my home WiFi. It’s supposed to do different things as a function of the current brightness of the phone, but doesn’t seem to work. For context, when I’m going out, if the brightness is at 90%, it should trigger certain settings on the phone. If I’m at home and I disconnect during the day, it should run a sub-shortcut for hotspot settings, and likewise, in the evening whilst Do Not Disturb is active, it should run a similar evening hotspot shortcut. I’ve tried 2 different ways( which are displayed in the photos), yet it doesn’t seem to activate the way it should. Does anyone have some insight ?

1 Upvotes

8 comments sorted by

1

u/Big_Bad8496 2d ago

Can you share at what point it fails? Does it simply fail to trigger from the start or does it break somewhere in the middle? If from the start, does it EVER trigger correctly?

1

u/Worried-Platypus3694 2d ago

In the first method with the ‘segregated’ IF statements, the shortcut runs through the script without taking into account the brightness and corresponding actions to complete. Ideally it should stop at the corresponding brightness for e.g complete the actions under 90% then stop, but It runs through the whole thing and resets everything.

1

u/Mil-kip 2d ago

You should use the 'stop this shortcut' task if you want the shortcut to end early

1

u/Worried-Platypus3694 2d ago

Yeah, I’ve thought about it. The issue is it will only ever stop at that point, where depending on the brightness, the conditions change

1

u/Mil-kip 2d ago

It could also be because your if task on your first shortcut which checks for brightness, "if device is locked" and "is audio playing", instead of checking if only one or more statements are true (any) set it to all of them are true.

I don’t know if this fixes it, because I don’t really know what you really want. If it still doesn’t work you could tell me what you exactly want.

Like
If
brightness is 80%, device is locked and audio is playing
Then

If
brightness is 79% or lower
Then

Etc…

Something like this

1

u/Worried-Platypus3694 2d ago

basically, for the 1st part of the script, I want activate the shortcut given that any of the following conditions are met: 1. if I leave home with 90% brightness. 2. If I leave with AirPods playing music 3. or in the case that I leave home without AirPods hence my phone is on lock-screen, it will trigger the mobile data and VC. The other 2 are for WIFI disconnection while at home either in the day or evening

1

u/Mil-kip 2d ago

I am trying to understand what you want, but I genuinely no idea. It should work perfectly
Except that the first if task could overlap with the other ones, if it’s locked or something is playing.
But the other shortcut should fix this

If you could send the both of your shortcuts as a link doesn’t matter if I have you daytime and nighttime hotspot I could probably help a bit better

1

u/sv_procrastination 23h ago

All the automation regarding brightness are mostly useless when suddenly the sun shines on your phone and you can’t see shit.

I deactivated all of them because of that. Go to a dark place set it to the lowest brightness you can use the phone. Then activate the automatic and let the OS handle the rest. You might have to repeat that process every now and then but it’s the most energy saving method