fix string comparison on mqtt error message for Server unavailable

This commit is contained in:
Evan Jarrett 2024-10-29 19:28:59 -05:00
parent d12c7809dd
commit ae4f7c5c4b

View File

@ -133,7 +133,7 @@ class MqttClient(Communicator): # type: ignore[misc]
"""Mqtt connection callback."""
threading.current_thread().name = "mqtt"
if reason_code != 0:
if reason_code == "Server Unavailable":
if reason_code == "Server unavailable":
logger.error(
"Unable to connect to MQTT server: MQTT Server unavailable"
)