Skip to content

Commit a85047b

Browse files
author
brentru
committed
correct parsing of default topic
1 parent b2b8b18 commit a85047b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Adafruit_IO/mqtt_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def _mqtt_message(self, client, userdata, msg):
118118
topic = parsed_topic[3]
119119
payload = msg.payload.decode('utf-8')
120120
else: # default topic
121-
topic = parsed_topic[1]
121+
topic = parsed_topic[2]
122122
payload = '' if msg.payload is None else msg.payload.decode('utf-8')
123123
self.on_message(self, topic, payload)
124124

0 commit comments

Comments
 (0)