fix: mqtt qos constant

- Use integer 1 for QoS level instead of importing constant
This commit is contained in:
Josh Finlay 2025-01-08 10:02:26 +10:00
parent aa1b6b384d
commit 771a0d3e23
1 changed files with 2 additions and 3 deletions

View File

@ -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