From 0a74aab43f74b67ae4ae84e6c4d0a275c64f76af Mon Sep 17 00:00:00 2001 From: Jens Ahrensfeld Date: Sun, 21 Jun 2026 12:18:30 +0200 Subject: [PATCH] gui: remember the ambient temperature in the user config Persists whenever set via the entry, and re-applies automatically on connect - so it survives a server restart (which would otherwise fall back to config.json's ambient_temperature) without retyping it. --- client/brewpi_gui.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/client/brewpi_gui.py b/client/brewpi_gui.py index 3ed563b..15669e1 100755 --- a/client/brewpi_gui.py +++ b/client/brewpi_gui.py @@ -382,6 +382,11 @@ class Window(QtWidgets.QMainWindow, Ui_MainWindow): # on_sud_changed() routes the reply to update_sud_forecast() instead # of a save dialog. self.msg_sud.send({'Save': True}) + # Re-apply the last ambient temperature we set, in case the server + # restarted since (and so fell back to its own config.json default). + remembered_ambient = self.user_config.get('ambient_temperature') + if remembered_ambient is not None: + self.msg_system.send({'AmbientTemp': remembered_ambient}) def on_plot_timer(self): self.plot.sample( @@ -517,6 +522,7 @@ class Window(QtWidgets.QMainWindow, Ui_MainWindow): value = float(self.lineEdit_ambient.text()) except ValueError: return + self.user_config.set('ambient_temperature', value) self.msg_system.send({'AmbientTemp': value}) def update_status_env_label(self):