ESPHome 2026.6.0-dev
Loading...
Searching...
No Matches
safe_mode_button.cpp
Go to the documentation of this file.
1#include "safe_mode_button.h"
2#include "esphome/core/hal.h"
3#include "esphome/core/log.h"
5
6namespace esphome::safe_mode {
7
8static const char *const TAG = "safe_mode.button";
9
11 this->safe_mode_component_ = safe_mode_component;
12}
13
15 ESP_LOGI(TAG, "Restarting in safe mode");
17
18 // Let MQTT settle a bit
19 delay(100); // NOLINT
21}
22
23void SafeModeButton::dump_config() { LOG_BUTTON("", "Safe Mode Button", this); }
24
25} // namespace esphome::safe_mode
void set_safe_mode(SafeModeComponent *safe_mode_component)
SafeModeComponent provides a safe way to recover from repeated boot failures.
Definition safe_mode.h:18
void set_safe_mode_pending(const bool &pending)
Set to true if the next startup will enter safe mode.
void HOT delay(uint32_t ms)
Definition hal.cpp:85
Application App
Global storage of Application pointer - only one Application can exist.