Skip to content

Commit

Permalink
Merge pull request MeshAddicts#101 from afairclo/patch-4
Browse files Browse the repository at this point in the history
Remove device role if role not sent (existing nodes)
  • Loading branch information
kevinelliott authored Sep 12, 2024
2 parents c83d1e3 + b5de308 commit 73b0b37
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mqtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,8 @@ async def handle_nodeinfo(self, msg):

if 'role' in msg['payload']:
node['role'] = msg['payload']['role']
else:
node['role'] = 0

self.data.update_node(id, node)
print(f"Node {id} updated")
Expand Down

0 comments on commit 73b0b37

Please sign in to comment.