Dynamic ble_client?

When setting up a ble_client in ESPHome, one has to provide the mac address statically in the YAML configuration.

Is it somehow possible to dynamically create a ble_client in a way that the mac address is provided dynamically, let’s say as an example through a text input?

In particular I am wondering if it would be possible to do this through lambdas. I assume it might be possible to create a BLEClient instance e.g. in response to the text input changing. But I’m not sure if such an attempt would be entirely futile or would be possible. If anyone out there has done something like this before and/or has some example code, that would be very useful.

Any input greatly appreciated, thanks!

1 Like

I have a similar scenario with a BLE device, where the MAC changes upon battery change…

So it is typically recognized by certain parameters in the BLE advertising - and from here the mac can be identified, and should then be used for connecting and obtaining more details…

Maybe a ticket is required on Github in order to get such functionality (if not already present) ?