ESPHome
2026.12.0-dev
Loading...
Searching...
No Matches
esphome
components
restart
restart.cpp
Go to the documentation of this file.
1
#include "
restart.h
"
2
#include "
esphome/core/application.h
"
3
#include "
esphome/core/log.h
"
4
5
namespace
esphome::restart
{
6
7
ESPHOME_LOG_TAG
(TAG,
"restart"
);
8
9
void
restart_device
() {
10
ESP_LOGI(TAG,
"Restarting device"
);
11
App
.
safe_reboot
();
12
}
13
14
}
// namespace esphome::restart
application.h
esphome::Application::safe_reboot
void safe_reboot()
Definition
application.cpp:320
log.h
esphome::restart
Definition
restart.cpp:5
esphome::restart::ESPHOME_LOG_TAG
ESPHOME_LOG_TAG(TAG, "restart")
esphome::restart::restart_device
void restart_device()
Run by the restart button and switch.
Definition
restart.cpp:9
esphome::App
Application App
Global storage of Application pointer - only one Application can exist.
restart.h
Generated by
1.12.0