Store Connecting Bluetooth Device in Variable
Posted: 14 Feb 2019 14:54
I am attempting to create a workflow to easily manage headset/car connections with my smart watch (Samsung Gear S3, if it matters), so that when I connect to my headset/car, my watch disconnects, allowing the headset to connect, and then when the headset disconnects, reconnect to the watch.
When I do this as a single workflow for each device, the workflow works well, and looks like this:
1. TRIGGER - Bluetooth device connected: Headset
2. CONDITION IS TRUE - Bluetooth device connected: Gear S3
3. ACTION - Disconnect Bluetooth Device: Gear S3
4. ACTION - Connect Bluetooth Device: Headset
However, this requires a new workflow for each device I connect. Instead, I'd like to have a single workflow that handles all my devices. It seems to me that the workflow would need to work like this:
1. MULTIPLE TRIGGERS - Bluetooth device connected: Headset OR Car OR Speaker
2. ACTION - Init Variable with new device that is connecting
3. ACTION - Disconnect Bluetooth Device: Gear S3
4. ACTION - Connect Bluetooth Device: New device connecting
Is this possible? The kicker seems to be steps 2 & 4 - how do I save the new device connecting to a variable, and how do I then use that varible to connect to the new device?
Even better would be if I could create a trigger with a condition saying "Any device with a headset profile that connects EXCEPT FOR my watch," but one step at a time.
When I do this as a single workflow for each device, the workflow works well, and looks like this:
1. TRIGGER - Bluetooth device connected: Headset
2. CONDITION IS TRUE - Bluetooth device connected: Gear S3
3. ACTION - Disconnect Bluetooth Device: Gear S3
4. ACTION - Connect Bluetooth Device: Headset
However, this requires a new workflow for each device I connect. Instead, I'd like to have a single workflow that handles all my devices. It seems to me that the workflow would need to work like this:
1. MULTIPLE TRIGGERS - Bluetooth device connected: Headset OR Car OR Speaker
2. ACTION - Init Variable with new device that is connecting
3. ACTION - Disconnect Bluetooth Device: Gear S3
4. ACTION - Connect Bluetooth Device: New device connecting
Is this possible? The kicker seems to be steps 2 & 4 - how do I save the new device connecting to a variable, and how do I then use that varible to connect to the new device?
Even better would be if I could create a trigger with a condition saying "Any device with a headset profile that connects EXCEPT FOR my watch," but one step at a time.