When iPhone connects to Bluetooth Car automatically open gate -> Shortcuts app keeps asking permission!

What I’d like to do is the following:

When I start my car and have my iPhone, their Bluetooth’s automatically pair.
This is a sign I’m leaving, so I’d like to automatically open the gate in that case.

I have Home Assistant scripts for opening the gate (gate_departure_script).

I can see this script and even call it using the Shortcut app with its Automation feature.
However, the app does not run the automation automatically but asks permission to execute, defeating the purpose.

How can I automatically trigger it? Without requiring permissions? Any clue or alternatives?

I don’t know about the iOS version, but the Android version of the Companion app now has sensors for what bluetooth devices are connected to your phone.

I don’t know what the shortcut app is or what it does.

You can’t because is a IOS BT automation and is not allowed

This is a limitation imposed by Apple out of security concerns. The following trigger types in Shortcuts personal automations cannot be run automatically:

  • Arrive / Leave / Before I Commute
  • Email
  • Message
  • Wi-Fi
  • Bluetooth

If you make a personal automation with any of those triggers, it’ll first show a notification on your lock screen that you must accept to continue running the actions. I agree that this kind of defeats the purpose of an automation, since it’s no longer automatic. Only thing that can be done is send feedback to Apple, as the limitation is on their end.

The best alternative would be to use an iBeacon which typically costs only a few bucks. Keep it plugged in to any of your cars USB ports, and then when the car gets powered on it’ll start transmitting via Bluetooth. Once your phone sees that signal and sends a webhook to Home Assistant which runs your gate scripts. I use the Geofency app to do this but it’s also supported in OwnTracks.

I’ve been doing this for two years now with Geofency (to determine car presence) and it works very well.