mirror of
https://github.com/esphome/esphome.git
synced 2024-12-20 16:18:49 +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
@ -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 New Issue
Block a user