I’m trying to create a GUI automation that, after triggered, will only run if the mobile app (Android) is connected to a specific paired device.
In the app, I can see what it is connected to.
In the automation “And if” section, I have:
Entity: phone Bluetooth connection
Attribute: connected paired devices
State: I’ve tried everything I can think of, and nothing works.
I assume it should be the MAC address of the connected paired device.
How should the MAC be expressed?
If you look at the trace (above), and the “connected paired” list within the app, the state shown in they show a "- " before the MAC address.
I also tried adding the "- ".
(yaml list?)
When you do that, the “wanted_state” in the trace shows in single quotes
In the the “paired” list within the app, the MAC addresses are listed in [square brackets]. I tried that too.
For experimentation sake, I tried to find a way to look for an empty list of “connected paired” devices and couldn’t find a way that worked.
I’ve been using the “built in” automation engine for presence detection because it was easier and I didn’t want a node-red flow that polls. But I may just have to have the script send a message to node-red and let it do the work. I just tested that. It’s simple for node-red to check the “connected paired” list.
This is reminding me of an ancient “Ohio Scientific” computer I had. The owners manual wasn’t very specific about the command syntax, so you just had to try things until you found the correct syntax.