Skip to content

Commit

Permalink
Merge pull request #75 from afairclo/develop
Browse files Browse the repository at this point in the history
Remove device role if role not sent
  • Loading branch information
kevinelliott authored Sep 5, 2024
2 parents 0ace42b + 0202696 commit 5470e14
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 2 additions & 0 deletions mqtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,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} added")
Expand Down
9 changes: 6 additions & 3 deletions templates/static/map.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@
color: 'white',
width: 2
})
})
}),
zIndex: 0
});
var offlineStyle = new ol.style.Style({
Expand All @@ -101,7 +102,8 @@
color: 'white',
width: 2
})
})
}),
zIndex: 1
});
var onlineStyle = new ol.style.Style({
Expand All @@ -114,7 +116,8 @@
color: 'white',
width: 2
})
})
}),
zIndex: 2
});
const nodes = {};
Expand Down

0 comments on commit 5470e14

Please sign in to comment.