forked from M-Labs/thermostat
Match statement
This commit is contained in:
parent
fde4e42069
commit
98f2d70cf6
|
@ -606,10 +606,11 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
|
|||
line = getattr(self, f'ch{ch}_t_line')
|
||||
line.setVisible(False)
|
||||
elif param.opts.get("commands", None) is not None:
|
||||
if param.name() == 'Temperature PID':
|
||||
getattr(self, f'ch{param.opts["payload"]}_t_line').setVisible(True)
|
||||
elif param.name() == 'Set Temperature':
|
||||
getattr(self, f'ch{param.opts["payload"]}_t_line').setValue(data)
|
||||
match param.name():
|
||||
case 'Temperature PID':
|
||||
getattr(self, f'ch{param.opts["payload"]}_t_line').setVisible(True)
|
||||
case 'Set Temperature':
|
||||
getattr(self, f'ch{param.opts["payload"]}_t_line').setValue(data)
|
||||
await asyncio.gather(*[self.client._command(x.format(value=data)) for x in param.opts["commands"]])
|
||||
|
||||
def _set_param_tree(self):
|
||||
|
|
Loading…
Reference in New Issue