Port handling

This commit is contained in:
Mark Qvist 2025-01-25 15:39:47 +01:00
parent 23e0e2394e
commit 4f201c5615

View File

@ -58,6 +58,11 @@ class MQTT():
self.is_connected = False
def set_server(self, host, port):
try:
port = int(port)
except:
port = None
self.host = host
self.port = port or 1883