Image: github.com · What does this implement/fix? Adds ESPPreferenceObject::sync(), which writes one preference to permanent storage right away and leaves every other pending save queued. Today a component that needs ...
ESPHome given a way to save one preference without flushing all
A contributor used Claude Code on a proposed per-key preference save for ESP32 and Zephyr. Host tests pass, but the contributor had not tested it on hardware.
Credits
Earliest dated source: Details reviewed:
The full story
A proposed ESPHome change adds ESPPreferenceObject::sync(), so a component can immediately persist one preference without flushing other components’ pending writes. The contributor says the code was generated with Claude Code and is using it to persist a replay nonce.
The implementation covers ESP32, Zephyr and host storage, with atomic host-file updates. Host unit tests and platform compilation are described, but the author explicitly states that the new ESP32 and Zephyr code had not run on hardware. ESP8266, RP2040 and LibreTiny are not supported by the per-key interface.
Device and compatibility
- ESP32, Zephyr/nRF52 and host implementation; not ESP8266, RP2040 or LibreTiny.Source ↗
What Claude did
- Generated code for the disclosed ESPHome pull request.Claude Code Source ↗
How it was done
Tools
Themes
Loading themes…
Sources
From the maker's own write-up or code. We summarise what they report; we haven't tested it ourselves.