ESPHOME determine which HA instant is communicating with ESPHOME device

I have 3 HA instances. (all virtual instances)
Prod - current production HA instance (IP: 17)
NewProd - Instance where new version of my setup will be running (IP:18)
Dev - instance where I am developing a new version of my setup (IP:19)

“instructions” = switching switches on or off etc.
A single esphome device can connect to multiple HA instances (Great feature)

I want to update my ESPHome (ESP8266) devices so that I can ignore “instructions” from the HA DEV instance . For this I need to determine, at the esp8266 device, which HA instance is providing the “instructions”.
Any ideas?

How are they connected to HA? Via MQTT or the API?

They connect via API

Or you could delete the device from the DEV machine.

This is however not true if esphome runs btproxy. Just a warning…bt proxying can only go on one HA instance. It took me quite a lot of searching and tinkering to get to this…

There’s client_info: etc…

Not sure how much that helps though.

1 Like

This can help too: