From 0ef1d178d29a5e7dc7c038d377432bb02375cfba Mon Sep 17 00:00:00 2001 From: Otto Winter Date: Wed, 3 Jul 2019 16:34:03 +0200 Subject: [PATCH] Fix deep sleep on_shutdown hooks (#660) Fixes https://github.com/esphome/feature-requests/issues/294 --- esphome/core/application.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/esphome/core/application.h b/esphome/core/application.h index 82f344bf1a..e2bf8c0ad9 100644 --- a/esphome/core/application.h +++ b/esphome/core/application.h @@ -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_; }