mirror of
https://github.com/esphome/esphome.git
synced 2025-09-02 11:22:24 +01:00
Fix deep sleep on_shutdown hooks (#660)
Fixes https://github.com/esphome/feature-requests/issues/294
This commit is contained in:
@@ -119,9 +119,13 @@ 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_; }
|
||||
|
||||
|
Reference in New Issue
Block a user