From 6f4638280694ea73970c438f3ee4db9e8babe59d Mon Sep 17 00:00:00 2001 From: proddy Date: Tue, 3 Oct 2023 22:06:44 +0100 Subject: [PATCH] fix shower duration --- src/shower.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shower.cpp b/src/shower.cpp index f596bd95d..f5fd144bb 100644 --- a/src/shower.cpp +++ b/src/shower.cpp @@ -103,9 +103,9 @@ void Shower::loop() { // char s[50]; // snprintf(s, 50, "%02u:%02u:%02u", (uint8_t)(duration_ / 3600000UL), (uint8_t)(duration_ / 60000UL), (uint8_t)((duration_ / 1000UL) % 60)); - doc["duration"] = (uint8_t)(duration_ / 1000UL); // seconds + doc["duration"] = (duration_ / 1000UL); // seconds Mqtt::queue_publish("shower_data", doc.as()); - LOG_INFO("finished with duration %d", duration_); + LOG_INFO("finished with duration %lu seconds", duration_); } }