ESPHome 2026.12.0-dev
Loading...
Searching...
No Matches
factory_reset_device.cpp
Go to the documentation of this file.
2
4
5#ifdef USE_OPENTHREAD
7#endif
9#include "esphome/core/log.h"
10
11namespace esphome::factory_reset {
12
13ESPHOME_LOG_TAG(TAG, "factory_reset");
14
15static void reset_and_reboot() {
18}
19
21 ESP_LOGI(TAG, "Resetting");
22#ifdef USE_OPENTHREAD
23 openthread::global_openthread_component->on_factory_reset(reset_and_reboot);
24#else
25 reset_and_reboot();
26#endif
27}
28
29} // namespace esphome::factory_reset
void factory_reset_device()
Run by the factory reset button and switch.
ESPHOME_LOG_TAG(TAG, "factory_reset")
OpenThreadComponent * global_openthread_component
ESPPreferences * global_preferences
Application App
Global storage of Application pointer - only one Application can exist.
bool reset()
Forget all unsaved changes and re-initialize the permanent preferences storage.
Definition preferences.h:41