ip -> host

This commit is contained in:
atse 2024-08-23 15:43:02 +08:00
parent 1db3a3ccb9
commit 958fddf953

View File

@ -30,9 +30,9 @@ def get_argparser():
"--connect", "--connect",
default=None, default=None,
action="store_true", action="store_true",
help="Automatically connect to the specified Thermostat in IP:port format", help="Automatically connect to the specified Thermostat in host:port format",
) )
parser.add_argument("IP", metavar="ip", default=None, nargs="?") parser.add_argument("HOST", metavar="host", default=None, nargs="?")
parser.add_argument("PORT", metavar="port", default=None, nargs="?") parser.add_argument("PORT", metavar="port", default=None, nargs="?")
parser.add_argument( parser.add_argument(
"-l", "-l",
@ -157,8 +157,8 @@ class MainWindow(QtWidgets.QMainWindow):
self.loading_spinner.hide() self.loading_spinner.hide()
if args.connect: if args.connect:
if args.IP: if args.HOST:
self.host_set_line.setText(args.IP) self.host_set_line.setText(args.HOST)
if args.PORT: if args.PORT:
self.port_set_spin.setValue(int(args.PORT)) self.port_set_spin.setValue(int(args.PORT))
self.connect_btn.click() self.connect_btn.click()