Updating ESPHome Devices Sequentially with Home Assistant Scripts

Why I Needed Sequential Updates I maintain 20‑plus ESPHome nodes on a small ARM‑based Home Assistant server. Each OTA update forces a full C++ compile, which can take ≈ 5 min per device. Two compiles at once, however, balloon the total wall‑time (CPU contention + I/O) and can push the server to its limits. I opened esphome/feature‑requests #2171 asking for a shared build‑cache across devices—because most of my YAML files differ only in pin mappings. If the cache wasn’t per device, maybe I could have kicked off all devices at once, or even used esphomes own “update all” as it had its own issues with not being able to run for hours and hours. Until that feature lands, the workaround has been to update devices strictly one after another. ...

May 12, 2025 · 4 min · Michael Bisbjerg