Closed rehakf closed 1 month ago
There's no need to save preferences every second, but this is coming from ESPHome, not from our code. I will take a look for a way to change this.
Thanks for highlighting this.
I'm sorry about that - it's not every second it's every minute but It is also quite often
It corresponds to ESPHome Core Configuration `Adjusting flash writes
preferences: flash_write_interval: 1min `
Maybe it don't really write every minute? (1 cached, 0 written, 0 failed) ... ?
Maybe it don't really write every minute? (1 cached, 0 written, 0 failed) ... ?
No, it will only save when something changed, otherwise it will be cached. In fact, it's hard to find the right interval here. Saving too frequently could reduce the flash lifespan, while longer intervals could lead to lost of info in the case of a crash (which shouldn't be a big issue, as in the worse case the user will have to set some entity again). Maybe we should just have something on the docs around this, but at the same time, ESPHome documentation is there for this... 😉
So, I'm not gonna implement any change related to this for now, so I would close this.
You can always add this change directly to your panel's yaml to overwrite the default settings:
preferences:
flash_write_interval: 5min
Please feel free to reopen if you disagree. 😉
TFT Version
4.3.11
Firmware Version
4.3.11
Blueprint Version
4.3.9
Panel Model
EU
What is the bug?
Is saving preferences to flash every second necessary?
17:25:00 [D][esp32.preferences:114]: Saving 1 preferences to flash...
...17:26:00 [D][esp32.preferences:114]: Saving 1 preferences to flash...
...17:27:00 [D][esp32.preferences:114]: Saving 1 preferences to flash...
Steps to Reproduce
No response
Your Panel's YAML
No response
ESPHome Logs
No response
Home Assistant Logs