ESPHome 2026.4.0-dev
Loading...
Searching...
No Matches
esphome::Preferences Struct Reference

#include <preferences.h>

Inheritance diagram for esphome::Preferences:
esphome::PreferencesMixin< Preferences >

Public Member Functions

ESPPreferenceObject make_preference (size_t, uint32_t, bool)
 
ESPPreferenceObject make_preference (size_t, uint32_t)
 
bool sync ()
 Commit pending writes to flash.
 
bool reset ()
 Forget all unsaved changes and re-initialize the permanent preferences storage.
 
- Public Member Functions inherited from esphome::PreferencesMixin< Preferences >
ESPPreferenceObject make_preference (uint32_t type, bool in_flash)
 
ESPPreferenceObject make_preference (uint32_t type)
 

Detailed Description

Definition at line 22 of file preferences.h.

Member Function Documentation

◆ make_preference() [1/2]

ESPPreferenceObject esphome::Preferences::make_preference ( size_t ,
uint32_t  )
inline

Definition at line 25 of file preferences.h.

◆ make_preference() [2/2]

ESPPreferenceObject esphome::Preferences::make_preference ( size_t ,
uint32_t ,
bool  )
inline

Definition at line 24 of file preferences.h.

◆ reset()

bool esphome::Preferences::reset ( )
inline

Forget all unsaved changes and re-initialize the permanent preferences storage.

Usually followed by a restart which moves the system to "factory" conditions

Returns
true if operation is successful.

Definition at line 40 of file preferences.h.

◆ sync()

bool esphome::Preferences::sync ( )
inline

Commit pending writes to flash.

Returns
true if write is successful.

Definition at line 32 of file preferences.h.


The documentation for this struct was generated from the following file: