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 = getattr(self, f'ch{ch}_t_line')
|
||||||
line.setVisible(False)
|
line.setVisible(False)
|
||||||
elif param.opts.get("commands", None) is not None:
|
elif param.opts.get("commands", None) is not None:
|
||||||
if param.name() == 'Temperature PID':
|
match param.name():
|
||||||
getattr(self, f'ch{param.opts["payload"]}_t_line').setVisible(True)
|
case 'Temperature PID':
|
||||||
elif param.name() == 'Set Temperature':
|
getattr(self, f'ch{param.opts["payload"]}_t_line').setVisible(True)
|
||||||
getattr(self, f'ch{param.opts["payload"]}_t_line').setValue(data)
|
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"]])
|
await asyncio.gather(*[self.client._command(x.format(value=data)) for x in param.opts["commands"]])
|
||||||
|
|
||||||
def _set_param_tree(self):
|
def _set_param_tree(self):
|
||||||
|
|
Loading…
Reference in New Issue