From b4e7007c4a3056a234c2b0830c01e44979868640 Mon Sep 17 00:00:00 2001 From: Jens Ahrensfeld Date: Sat, 27 Jun 2026 21:16:49 +0200 Subject: [PATCH] Pre-init pot temperature input with ambient temp on first server push Mirrors PyQt client which seeds doubleSpinBox_pot_temp from the remembered ambient on startup. In the browser there is no persistence, so the first AmbientTemp message from the server is used instead. Flag resets on reconnect so it re-syncs if the server restarts. Co-Authored-By: Claude Sonnet 4.6 Claude-Session: https://claude.ai/code/session_01DF16nV2ispNw1C9SbvqbRQ --- web/app.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/web/app.js b/web/app.js index 569bb14..9cc9d14 100644 --- a/web/app.js +++ b/web/app.js @@ -32,6 +32,7 @@ let initialPowerSync = true; let initialSpeedSync = true; let initialHeatrateSync = true; let initialTempSollSync = true; +let initialPotTempSync = true; let ambientTemp = null; let warpFactor = 1.0; @@ -702,6 +703,10 @@ function onSystemChanged(msg) { if (document.activeElement !== document.getElementById('ambient-temp')) { document.getElementById('ambient-temp').value = msg.AmbientTemp; } + if (initialPotTempSync) { + document.getElementById('pot-temp').value = msg.AmbientTemp; + initialPotTempSync = false; + } updateEnvStatusLine(); } if ('WarpFactor' in msg) { @@ -755,6 +760,7 @@ function connect() { initialSpeedSync = true; initialHeatrateSync = true; initialTempSollSync = true; + initialPotTempSync = true; setConnected(true); for (const channel of CHANNELS) { ws.send(JSON.stringify({'+': channel}));