The Bluetooth Event trigger fires when the Bluetooth state changes on the device. It can be configured to fire when Bluetooth is enabled or disabled, or when connected to or disconnected from a specific Bluetooth device.

Options

  • Bluetooth Enabled - Trigger fires when Bluetooth is turned on
  • Bluetooth Disabled - Trigger fires when Bluetooth is turned off
  • Device Connected - Trigger fires when a Bluetooth device connects
  • Device Disconnected - Trigger fires when a Bluetooth device disconnects

Device Selection

When selecting "Device Connected" or "Device Disconnected", you can specify which device to monitor:

  • Any Device - Trigger fires for any Bluetooth device connection/disconnection
  • Specific Device - Choose from a list of paired devices. The list shows the device alias/name and MAC address.

If Bluetooth is currently disabled when configuring the trigger, you will be prompted to enable it so that paired devices can be listed.

Magic Text

When this trigger fires for device connection/disconnection events, the following information is available via magic text:

  • The name of the connected/disconnected Bluetooth device {bluetooth_device_name}

Examples

Example 1: Set Media Volume for Speaker

Triggers

Device Connected (Anker Speaker)
Actions

Volume Change: Media Volume to 50%

Example 2: Disable Bluetooth at Night

Triggers

Bluetooth Enabled
Actions

Disable Bluetooth
Constraints

Time of Day: 11:00 PM - 6:00 AM

Notes

  • The trigger listens for system broadcasts: ACTION_STATE_CHANGED for Bluetooth on/off, and ACTION_ACL_CONNECTED/ACTION_ACL_DISCONNECTED for device connections
  • Device selection shows both the device alias (user-defined name) and the device's MAC address for identification
  • Only paired devices are shown in the selection list
  • The trigger uses a shared receiver for efficiency when multiple macros use Bluetooth triggers

Permissions Required

  • Bluetooth Connect - Required on Android 12+ (BLUETOOTH_CONNECT permission)

See Also