Hi all,
HomeAssistant loses track of my mdns devices if they change IP address, which drives me nuts. I know that I could just assign static IP address for each of these on my DHCP server, but that kind of defeats the purpose of using mdns in my opinion – if I’m going to do that, I might as well just use the IP address.
ESPHome, for example, uses mdns by default. I use the native API, which works awesome, but every couple of weeks I find that a device has dropped off from HomeAssistant, usually at the most inopportune moment, and so far the issue is usually that the IP address of the device has changed, and unfortunately HomeAssistant requires a restart to pick up the new address from mdns.
Does anyone know if the zeroconf service is exposed somehow so that I could put it in an automation?
For example, I can imagine something like the following pseudocode:
trigger:
to: device.unavailable
condition:
integration: ESPHome
action:
service.start
zeroconf.discover_devices
alternatively
zeroconf.resolve
id: mydevice.local
I’ve seen threads with other users with this issue. Is the only solution to manually set static IP addresses for all of these devices?