ESP32, writing and reading from NVS

I can’t find any info about writing / reading from ESP32 NVS in ESPhome, can someone help on this?

Well you can’t write straight to it with ESPHome but when you create some permanent variables they’ll be written in it :wink:
Why do you want to get access at NVS as such ?

Have a read about Global Variables.

  • restore_value (Optional, boolean): Whether to try to restore the state on boot up. Be careful: on the ESP8266, you only have a total of 96 bytes available for this! Defaults to no. This will use storage in “RTC memory”, so it won’t survive a power-cycle unless you use the esp8266_restore_from_flash option to save to flash. See esp8266_restore_from_flash for details.

On the ESP32 they just work.