So my question is that if for a given device which currently has 192.168.1.10 assigned in the secret file, if I edit this value to 192.168.1.11. Will the update work over the air and would the device upon reboot be recognized automatically by HA without needing changes to existing automatons?
You can also update your device config to what you want, but for each flash command specify the original/previous IP to connect to. This works from the command line.
How about another approach that seems less error prone to me. How about I just do following steps:
Change the ESPHome configuration and remove static IP assignment and flash the device. Upon reboot the ESPHome devices will now revert to DHCP mode but should get the same old IP address as all these devices are also assigned static IP address on the DHCP server within OPNSense.
Change the DHCP assignment on OPNSense
Reboot the device
It is easier to swap IP address on the DHCP service and there are fewer steps involved.
Yes, I think DHCP reservations are the more manageable approach.
Personally I use DHCP without reservations just fine. I know some people have reported issues with that, but it’s been working fine for me — even on my old scrappy network, which I have since revamped.
My approach to keep apart from micro-management.
No need in static IP or DHCP reservations - just administrative overhead and nothing else.
DHCP + mDNS make it working in easy way.
IMHO.