diff --git a/src/shower.cpp b/src/shower.cpp index 70f34039d..82ffab030 100644 --- a/src/shower.cpp +++ b/src/shower.cpp @@ -57,7 +57,8 @@ void Shower::loop() { // first check to see if hot water has been on long enough to be recognized as a Shower/Bath if (!shower_on_ && (time_now - timer_start_) > SHOWER_MIN_DURATION) { shower_on_ = true; - Mqtt::publish("shower_active", (bool)true); + char s[7]; + Mqtt::publish("shower_active", Helpers::render_boolean(s, true)); LOG_DEBUG(F("[Shower] hot water still running, starting shower timer")); } // check if the shower has been on too long @@ -78,7 +79,8 @@ void Shower::loop() { if ((timer_pause_ - timer_start_) > SHOWER_OFFSET_TIME) { duration_ = (timer_pause_ - timer_start_ - SHOWER_OFFSET_TIME); if (duration_ > SHOWER_MIN_DURATION) { - Mqtt::publish(F("shower_active"), (bool)false); + char s[7]; + Mqtt::publish(F("shower_active"), Helpers::render_boolean(s, false)); LOG_DEBUG(F("[Shower] finished with duration %d"), duration_); publish_values(); }