From eceb097cc7b6801e9041bb3ebcf9b1874bc47e41 Mon Sep 17 00:00:00 2001 From: proddy Date: Sun, 28 Jun 2026 16:08:31 +0200 Subject: [PATCH] fix thermostat date/time for HT3 --- CHANGELOG_LATEST.md | 3 ++- src/devices/thermostat.cpp | 5 ++++- src/emsesp_version.h | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG_LATEST.md b/CHANGELOG_LATEST.md index f47f825d9..991434ef8 100644 --- a/CHANGELOG_LATEST.md +++ b/CHANGELOG_LATEST.md @@ -13,7 +13,8 @@ For more details go to [emsesp.org](https://emsesp.org/). - signed value for solarInfuence [#3077](https://github.com/emsesp/EMS-ESP32/issues/3077) - set bin file upload limit to 1M again [3086](https://github.com/emsesp/EMS-ESP32/issues/3086) - check arithmetric operations on strings [#3127](https://github.com/emsesp/EMS-ESP32/discussions/3127) -- Fix: Prevent system crash during WiFi network discovery on ESP32-S3 hardware [#3128](https://github.com/emsesp/EMS-ESP32/pull/3128) +- prevent system crash during WiFi network discovery on ESP32-S3 hardware [#3128](https://github.com/emsesp/EMS-ESP32/pull/3128) +- fix setting date/time on Junkers thermostats ## Changed diff --git a/src/devices/thermostat.cpp b/src/devices/thermostat.cpp index 8f5441cc3..3cbfec93d 100644 --- a/src/devices/thermostat.cpp +++ b/src/devices/thermostat.cpp @@ -3070,7 +3070,6 @@ bool Thermostat::set_datetime(const char * value, const int8_t id) { data[6] = (tm_->tm_wday + 6) % 7; // Bosch counts from Mo, time from Su data[7] = (id == 0) ? 2 : tm_->tm_isdst + 2; // set DST and flag for ext. clock if (model() == EMSdevice::EMS_DEVICE_FLAG_JUNKERS) { - data[6]++; // Junkers use 1-7; data[7] = 0; } } else if (dt.length() == 23) { @@ -3094,6 +3093,10 @@ bool Thermostat::set_datetime(const char * value, const int8_t id) { return false; } + if (model() == EMSdevice::EMS_DEVICE_FLAG_JUNKERS) { + data[6]++; // Junkers use 1-7 for day of the week + } + // LOG_INFO("Setting date and time: %02d.%02d.2%03d-%02d:%02d:%02d-%d-%d", data[3], data[1], data[0], data[2], data[4], data[5], data[6], data[7]); write_command(EMS_TYPE_time, 0, data, 8, EMS_TYPE_time); diff --git a/src/emsesp_version.h b/src/emsesp_version.h index 74e1e397b..3928edd22 100644 --- a/src/emsesp_version.h +++ b/src/emsesp_version.h @@ -1 +1 @@ -#define EMSESP_APP_VERSION "3.8.3-dev.7" +#define EMSESP_APP_VERSION "3.8.3-dev.8"