mirror of
https://github.com/esphome/esphome.git
synced 2024-11-24 12:06:26 +01:00
Add missing nvs_flash_init() to ESP32 preferences code (#2805)
Co-authored-by: Maurice Makaay <mmakaay1@xs4all.net>
This commit is contained in:
parent
0cb715bb76
commit
57a029189c
@ -76,6 +76,7 @@ class ESP32Preferences : public ESPPreferences {
|
|||||||
uint32_t current_offset = 0;
|
uint32_t current_offset = 0;
|
||||||
|
|
||||||
void open() {
|
void open() {
|
||||||
|
nvs_flash_init();
|
||||||
esp_err_t err = nvs_open("esphome", NVS_READWRITE, &nvs_handle);
|
esp_err_t err = nvs_open("esphome", NVS_READWRITE, &nvs_handle);
|
||||||
if (err == 0)
|
if (err == 0)
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user