How to automatically disable Bluetooth with apple shortcuts?

https://monero.town/post/472387

How to automatically disable Bluetooth with apple shortcuts? - monero.town

Is there a way to make a apple shortcut automatically disable Bluetooth if no devices are connected but also act as a toggle for re enabling Bluetooth?

i think with the automations you can do that

There isn’t a way to check if you’re connected to a Bluetooth device through automations :/.

The best you can do is set an action after you connect/disconnect from a known Bluetooth device

There is, get ToolBox Pro. Test for if bluetooth is on and what speaker is currently active. If its Speaker, toggle it off. Use various apps you constantly use as a trigger to combat it turning itself back on all the time.
Here must some sort of IFTTT action for this.
Can you step back and explain why you want it disabled? What’s the actual problem you’re trying to fix?
I use Better Touch Tool for this as well as a number of other shortcuts, text replacement, screen snapping, etc.
folivora.ai - Great Tools for your Mac!

I just turn mine off from the control center menu, swipe down from top right corner. It’s already so simple, why is a shortcut needed at all?
that’s just a temporary toggle

Oops I forgot temporary.

I just found this tutorial and tried it and it works. I had to create two shortcuts, one for OFF and the other for ON

lifehacker.com/use-this-one-tap-shortcut-to-actua…

Use This One Tap Shortcut to Actually Turn Off Wifi and Bluetooth on Your iPhone

This trick disables wifi, cellular data, and Bluetooth, and keeps them that way.

Lifehacker