mirror of
https://github.com/esphome/esphome.git
synced 2024-12-22 05:24:53 +01:00
Fix deep sleep on_shutdown hooks (#660)
Fixes https://github.com/esphome/feature-requests/issues/294
This commit is contained in:
parent
762f1b1fc9
commit
0ef1d178d2
1 changed files with 5 additions and 1 deletions
|
@ -119,8 +119,12 @@ class Application {
|
|||
void safe_reboot();
|
||||
|
||||
void run_safe_shutdown_hooks() {
|
||||
for (auto *comp : this->components_)
|
||||
for (auto *comp : this->components_) {
|
||||
comp->on_safe_shutdown();
|
||||
}
|
||||
for (auto *comp : this->components_) {
|
||||
comp->on_shutdown();
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t get_app_state() const { return this->app_state_; }
|
||||
|
|
Loading…
Reference in a new issue