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):