Skip to content

Commit 7ada763

Browse files
author
brentru
committed
finish parser, tested
1 parent aca9f67 commit 7ada763

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Adafruit_IO/mqtt_client.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,8 @@ def _mqtt_message(self, client, userdata, msg):
108108
assume topic looks like `username/topic/id`
109109
"""
110110
parsed_topic = msg.topic.split('/')
111-
print(parsed_topic) # BR: Remove this
112111
if self.on_message is not None and parsed_topic[2] == 'weather':
113-
print('Weather Subscription')
114-
topic = parsed_topic[4]
112+
topic = parsed_topic[4] # parse out the forecast type
115113
payload = '' if msg.payload is None else msg.payload.decode('utf-8')
116114
elif self.on_message is not None and parsed_topic[0] == 'time':
117115
topic = parsed_topic[0]

0 commit comments

Comments
 (0)