ESPHome 2026.5.1
Loading...
Searching...
No Matches
factory_reset_button.cpp
Go to the documentation of this file.
2
4
5#ifdef USE_OPENTHREAD
7#endif
9#include "esphome/core/hal.h"
10#include "esphome/core/log.h"
11
13
14static const char *const TAG = "factory_reset.button";
15
16void FactoryResetButton::dump_config() { LOG_BUTTON("", "Factory Reset Button", this); }
18 ESP_LOGI(TAG, "Resetting");
19 // Let MQTT settle a bit
20 delay(100); // NOLINT
21#ifdef USE_OPENTHREAD
23#else
26#endif
27}
28
29#ifdef USE_OPENTHREAD
34#endif
35
36} // namespace esphome::factory_reset
void on_factory_reset(std::function< void()> callback)
OpenThreadComponent * global_openthread_component
ESPPreferences * global_preferences
void HOT delay(uint32_t ms)
Definition hal.cpp:85
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:40