Skip to content

Commit

Permalink
fix: remove hardcoded base topic in cmd subscription
Browse files Browse the repository at this point in the history
  • Loading branch information
c0un7-z3r0 committed Jan 13, 2025
1 parent e28ead4 commit 1bc01cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/jukebox/components/mqtt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def __init__(self, client: paho_mqtt.Client):

def _subscribe(self):
logger.debug("Subscribing to MQTT topics.")
self._mqtt_client.message_callback_add("phoniebox-dev/cmd/#", self._on_cmd)
self._mqtt_client.message_callback_add(f'{base_topic}/cmd/#', self._on_cmd)

def _on_cmd(self, client, userdata, msg):
cmd = split_topic(topic=msg.topic)
Expand Down

0 comments on commit 1bc01cf

Please sign in to comment.