Bluetooth Automation to keep devices connected?

Hello dear forum members,

I’ve been a new iPhone user for a month now, and so far I’ve gotten pretty good at iOS. However, I am stuck with one problem:

I have created an automation that activates Bluetooth when the Music App is started and deactivates it after 60 seconds when it is closed. This also works perfectly.

Now what happens is that the Music App is detected as closed when I minimize it, even though I continue to listen to music through the AirPods Pro. Bluetooth is deactivated after 60 seconds and I no longer hear anything.

So I want to customize my automation to only disable Bluetooth when no Bluetooth devices are connected. There is IF-THEN-ELSE under automations, but what do I have to set there? I just can’t get to grips with it, as I don’t know what to enter there, because I guess something has to be entered manually and there are no corresponding suggestions.

Can someone please help me create an automation:

IF any Bluetooth device connected THEN keep Bluetooth enabled OTHERS disable Bluetooth.

Thanks a lot for reading!

Best regards


Translated with (free version)

This does not address your request directly, but might inform as to what the underlying issue is that you are attempting to fix.

What is the driver for turning off the Bluetooth?

  • If it is power consumption, then it is ultra low energy these days and so unlikely to show any impact on battery life if it is passively standing by.
  • If it is security, then perhaps a location trigger or schedule might be a viable alternative for turning it off.
  • If you have another reason, please can you share it?
1 Like

It is the second point. I do not want to be tracked when I am on the road. However, I would like to be able to listen to music via Bluetooth when needed.
A location-dependent switch-off would therefore unfortunately be of no use to me. I would also then need an automation that detects when Bluetooth devices are connected.

Okay, so you don’t want to be tracked by Bluetooth when you are out… except when you have Bluetooth headphones connected, at which point any tracking becomes acceptable?

Surely, you are either securing your device or not in terms of Bluetooth tracking as “sometimes secure” is not a valid security practice.

Have you considered the usual recommendation of a wired connection?

Well, when I listen to music or make phone calls, I usually move undisturbed alone away from any Bluetooth beacons. Then, of course, Bluetooth may be activated.

I want that just because I do not want to have cables and the tangle around it.

The point is: if I do not use it and no device is connected, then it should be deactivated, because Bluetooth is known for security weaknesses and should not always be on.

You could look at Toolbox Pro and the Get Audio Output or Is Audio Playing actions.

However, Sylumer raised a very good point. I’d highly recommend checking out the Apple docs on Bluetooth security:

But, if you are genuinely concerned that you will be tracked via Bluetooth, there’s a lot of other ways that you can be tracked just as easily, so if it is only that then you’re unlikely to be gaining benefits.

(As an example: Shops track people inside them via Bluetooth to see their “hotspots”, but they also use cameras, motion detectors, and more—so it’s just one of a number of ways you’d be tracked in that scenario.)

Thanks for the hint with toolbox pro and the security link. It could help, I will try it