diff --git a/pytec/pytec/gui/model/thermostat.py b/pytec/pytec/gui/model/thermostat.py index 42b24f8..042ba4e 100644 --- a/pytec/pytec/gui/model/thermostat.py +++ b/pytec/pytec/gui/model/thermostat.py @@ -39,10 +39,9 @@ class Thermostat(QObject, metaclass=PropertyMeta): async def start_session(self, host, port): self.connection_state_changed.emit(ThermostatConnectionState.CONNECTING) await self._client.connect(host, port) - hw_rev_data = await self.get_hw_rev() + await self.get_hw_rev() self.connection_state_changed.emit(ThermostatConnectionState.CONNECTED) self.start_watching() - return hw_rev_data async def run(self): self._update_params_task = asyncio.create_task(self.update_params()) diff --git a/pytec/pytec/gui/view/thermostat_ctrl_menu.py b/pytec/pytec/gui/view/thermostat_ctrl_menu.py index 6a14597..247bd13 100644 --- a/pytec/pytec/gui/view/thermostat_ctrl_menu.py +++ b/pytec/pytec/gui/view/thermostat_ctrl_menu.py @@ -138,8 +138,6 @@ class ThermostatCtrlMenu(QtWidgets.QMenu): ) with QSignalBlocker(self.fan_auto_box): self.fan_auto_box.setChecked(fan_settings["auto_mode"]) - if not self.hw_rev_data["settings"]["fan_pwm_recommended"]: - self.set_fan_pwm_warning() def set_fan_pwm_warning(self): if self.fan_power_slider.value() != 100: diff --git a/pytec/tec_qt.py b/pytec/tec_qt.py index 37ec630..4dd8dca 100755 --- a/pytec/tec_qt.py +++ b/pytec/tec_qt.py @@ -58,7 +58,6 @@ class MainWindow(QtWidgets.QMainWindow): ui_file_path = importlib.resources.files("pytec.gui.view").joinpath("tec_qt.ui") uic.loadUi(ui_file_path, self) - self.hw_rev_data = None self.info_box = InfoBox() self.thermostat = Thermostat(self, self.report_refresh_spin.value()) @@ -220,7 +219,7 @@ class MainWindow(QtWidgets.QMainWindow): ) ) try: - self.hw_rev_data = await self._connecting_task + await self._connecting_task except (OSError, asyncio.CancelledError) as exc: await self.thermostat.end_session() if isinstance(exc, asyncio.CancelledError):