Moving integrations from IP-based to Hostname-based

Hello again, fantastic community.

After pushing the topic down my todo-list for a while, I’ve finally migrated my IoT devices from static IP addresses to DHCP-assigned reservations, as well as setting up a more robust name resolution within my network. All of them now resolve properly via nslookup.

For the time being I’m leaving the IPs the same as before, albeit assigned via DHCP, since I don’t want to disrupt the existing integrations, but soon I’ll have to shift the devices into a separate VLAN and change the addresses.

Before doing that I’d like to move the configured integrations in HA from ip-based to name-based, so as allow future address changes freely, and I’d like to do so while keeping the amount of rework as minimum as possible. The ones in configuration.yaml are easy, but the UI-created ones do not offer an option to change the endpoint.

Did anyone go through this already, and do you have any advice?
So far I found that you can remove and re-add an integration and it works if you name it exactly the same as before, not sure it’s the most elegant solution.

Bonus question: how to clear the dns cache in HA OS via terminal?

I guess you could try manually editing files in .storage, but this is not recommended. If you decide to do that, make a backup first. More info in this thread:

Try login (if you are at the ha > prompt) followed by resolvectl flush-caches.

Thanks a lot for the link.

I did just that with the .storage and it worked !