Skip to content

Commit

Permalink
Merge pull request #2158 from MichaelDvP/dev
Browse files Browse the repository at this point in the history
small fixes, webinterface and log messages
  • Loading branch information
proddy authored Oct 30, 2024
2 parents 2df67c2 + 5f1fa3f commit 30b7b6d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion interface/src/app/settings/NTPSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ const NTPSettings = () => {
};

const changeTimeZone = (event: React.ChangeEvent<HTMLInputElement>) => {
updateFormValue(event);
void updateState(readNTPSettings(), (settings: NTPSettingsType) => ({
...settings,
tz_label: event.target.value,
tz_format: TIME_ZONES[event.target.value]
}));
updateFormValue(event);
};

return (
Expand Down
10 changes: 8 additions & 2 deletions interface/src/app/settings/Version.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ const Version = () => {
// uncomment next 2 lines for testing, uses https://github.com/emsesp/EMS-ESP32/releases/download/v3.6.5/EMS-ESP-3_6_5-ESP32-16MB+.bin
// immediate: false,
// initialData: '3.6.5'
}).onSuccess((event) => {
if (!useDev) {
void sendCheckUpgrade(event.data);
}
});

// called immediately to get the latest version, on page load, then check for upgrade (works for both dev and stable)
Expand All @@ -67,7 +71,9 @@ const Version = () => {
// immediate: false,
// initialData: '3.7.0-dev.32'
}).onSuccess((event) => {
void sendCheckUpgrade(event.data);
if (useDev) {
void sendCheckUpgrade(event.data);
}
});

const STABLE_URL = 'https://github.com/emsesp/EMS-ESP32/releases/download/';
Expand Down Expand Up @@ -211,7 +217,7 @@ const Version = () => {
{isDev ? LL.DEVELOPMENT() : LL.STABLE()}&nbsp;
<Link
target="_blank"
href={useDev ? DEV_RELNOTES_URL : STABLE_RELNOTES_URL}
href={isDev ? DEV_RELNOTES_URL : STABLE_RELNOTES_URL}
color="primary"
>
(changelog)
Expand Down
3 changes: 2 additions & 1 deletion src/devices/thermostat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1605,10 +1605,11 @@ void Thermostat::process_RCTime(std::shared_ptr<const Telegram> telegram) {
if (setTimeRetry < 3) {
if (!use_dst) {
set_datetime("ntp", 0); // set from NTP without dst
LOG_INFO("thermostat time correction from ntp, ignoring dst");
} else {
set_datetime("ntp", -1); // set from NTP
LOG_INFO("thermostat time correction from ntp");
}
LOG_INFO("thermostat time correction from ntp");
setTimeRetry++;
}
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/web/WebStatusService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ bool WebStatusService::checkUpgrade(JsonObject root, std::string & latest_versio

if (!latest_version.empty()) {
#if defined(EMSESP_DEBUG)
emsesp::EMSESP::logger().debug("Checking for upgrade: %s > %s", EMSESP_APP_VERSION, latest_version.c_str());
emsesp::EMSESP::logger().debug("Checking for upgrade: %s < %s", EMSESP_APP_VERSION, latest_version.c_str());
#endif

version::Semver200_version settings_version(EMSESP_APP_VERSION);
Expand Down

0 comments on commit 30b7b6d

Please sign in to comment.