From 771a0d3e235eb736e83884181ca119ee5ea1901c Mon Sep 17 00:00:00 2001 From: Josh Finlay Date: Wed, 8 Jan 2025 10:02:26 +1000 Subject: [PATCH] fix: mqtt qos constant - Use integer 1 for QoS level instead of importing constant --- backend/mqtt_integration.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/backend/mqtt_integration.py b/backend/mqtt_integration.py index 7f8886d..b295b44 100644 --- a/backend/mqtt_integration.py +++ b/backend/mqtt_integration.py @@ -102,9 +102,8 @@ class HomeAssistantMQTT: logger.info("Connected to MQTT broker") self._connected = True try: - # Subscribe to command topic using gmqtt's Subscription class - from gmqtt.mqtt.constants import QOS_1 - await self.client.subscribe([(self.command_topic, QOS_1)]) + # Subscribe to command topic + await self.client.subscribe([(self.command_topic, 1)]) logger.info(f"Subscribed to command topic: {self.command_topic}") # Publish discovery config