ESPHome 2025.10.0-dev
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
12namespace esphome {
13namespace factory_reset {
14
15static const char *const TAG = "factory_reset.button";
16
17void FactoryResetButton::dump_config() { LOG_BUTTON("", "Factory Reset Button", this); }
19 ESP_LOGI(TAG, "Resetting");
20 // Let MQTT settle a bit
21 delay(100); // NOLINT
22#ifdef USE_OPENTHREAD
24#else
27#endif
28}
29
30#ifdef USE_OPENTHREAD
35#endif
36
37} // namespace factory_reset
38} // namespace esphome
virtual bool reset()=0
Forget all unsaved changes and re-initialize the permanent preferences storage.
void on_factory_reset(std::function< void()> callback)
OpenThreadComponent * global_openthread_component
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7
ESPPreferences * global_preferences
void IRAM_ATTR HOT delay(uint32_t ms)
Definition core.cpp:29
Application App
Global storage of Application pointer - only one Application can exist.