From fbb29ea2a8eb7692f711c43cd8861fc6e1e111af Mon Sep 17 00:00:00 2001 From: Mips Date: Sun, 31 Mar 2024 16:56:42 +0200 Subject: [PATCH] fix mqtt reason_code is not an int (#252) --- TheengsGateway/ble_gateway.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TheengsGateway/ble_gateway.py b/TheengsGateway/ble_gateway.py index cbd23ec..2433a57 100644 --- a/TheengsGateway/ble_gateway.py +++ b/TheengsGateway/ble_gateway.py @@ -153,7 +153,7 @@ def on_connect( self.subscribe(self.configuration["subscribe_topic"]) else: logger.error( - "Failed to connect to MQTT broker %s:%d reason code: %d", + "Failed to connect to MQTT broker %s:%d reason code: %s", self.configuration["host"], self.configuration["port"], reason_code, @@ -174,7 +174,7 @@ def on_disconnect( logger.info("Disconnected from MQTT broker") else: logger.error( - "Disconnected from MQTT broker with reason code = %d", reason_code + "Disconnected from MQTT broker with reason code = %s", reason_code ) if self.configuration["enable_websocket"]: