From 9406c76e55e014501b22680ab908fd9982bd3a44 Mon Sep 17 00:00:00 2001 From: Koen Schaper Date: Sun, 7 Nov 2021 16:32:14 +0100 Subject: [PATCH] fix shower timer; doing_cold_shot is never being reset + remove unnecessary conditions --- src/shower.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/shower.cpp b/src/shower.cpp index 494e8aecb..228f21d9b 100644 --- a/src/shower.cpp +++ b/src/shower.cpp @@ -60,7 +60,7 @@ void Shower::loop() { LOG_DEBUG(F("[Shower] hot water still running, starting shower timer")); } // check if the shower has been on too long - else if ((((time_now - timer_start_) > SHOWER_MAX_DURATION) && !doing_cold_shot_) && shower_alert_) { + else if ((time_now - timer_start_) > SHOWER_MAX_DURATION) { shower_alert_start(); } } @@ -97,6 +97,7 @@ void Shower::loop() { // at this point we're in the shower cold shot (doing_cold_shot_ == true) // keep repeating until the time is up if ((time_now - alert_timer_start_) > SHOWER_COLDSHOT_DURATION) { + shower_alert_stop(); } }