Skip to content

Commit

Permalink
correct bug #149
Browse files Browse the repository at this point in the history
  • Loading branch information
hlehoux2021 committed Dec 17, 2023
1 parent 5357ba2 commit 0151ab2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ha_mqtt_discoverable/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -888,8 +888,8 @@ def on_client_connected(client: mqtt.Client, *args):

# Invoke the parent init
super().__init__(settings, on_client_connected)
# Define the command topic to receive commands from HA
self._command_topic = f"{self._entity_topic}/command"
# Define the command topic to receive commands from HA, using `hmd` topic prefix
self._command_topic = f"{self._settings.mqtt.state_prefix}/{self._entity_topic}/command"

# Register the user-supplied callback function with its user_data
self.mqtt_client.user_data_set(user_data)
Expand Down

0 comments on commit 0151ab2

Please sign in to comment.