fix string comparison on mqtt error message for Server unavailable (#14675)

This commit is contained in:
Evan Jarrett 2024-10-30 04:05:58 -07:00 committed by GitHub
parent d12c7809dd
commit e4a6b29279
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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"
)