Hi
I’m trying to see if a specific bluetooth devices is connected to my phone (for example my car) to do an automation on it.
Since I only have one connected device in my house, I tried this out with ‘paired_devices’ so I could get an array of multiple devices, cause I know that in my car there will be more than one (car and watch) connected, but I’m struggeling with the function to see if a specific device is in the array.
So, I get
paired_devices: >-
[first_paired_device, second_paired_device, third_paired_device, fourth_paired_device,
fifth_paired_device, sixth_paired_device]
and I want to see if fourth_paired_device is in the array or not. How could I do that?
I know it should be done with a function, but it’s really the code itself that I don’t know.