Skip to content

Commit

Permalink
fix shower timer; doing_cold_shot is never being reset + remove unnec…
Browse files Browse the repository at this point in the history
…essary conditions
  • Loading branch information
kpschaper committed Nov 7, 2021
1 parent ea550b1 commit 9406c76
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/shower.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
Expand Down Expand Up @@ -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();
}
}

Expand Down

0 comments on commit 9406c76

Please sign in to comment.