Skip to content

Commit

Permalink
Remove "kit-" from firmware name
Browse files Browse the repository at this point in the history
  • Loading branch information
blavka committed Aug 7, 2018
1 parent 6bfbf7d commit 7f06214
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions bcg/gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
},
'base_topic_prefix': '', # ie. 'bigclown-'
'name': None,
'automatic_rename_kit_nodes': True,
'automatic_remove_kit_from_names': True,
'automatic_rename_generic_nodes': True,
'automatic_rename_nodes': True,
'rename': {}
Expand Down Expand Up @@ -352,8 +352,9 @@ def node_message(self, subtopic, payload):
name_base = 'generic-node'
elif self._config['automatic_rename_nodes']:
name_base = payload['firmware']
elif self._config['automatic_rename_kit_nodes'] and payload['firmware'].startswith("kit-"):
name_base = payload['firmware']

if self._config['automatic_remove_kit_from_names'] and name_base.startswith("kit-"):
name_base = name_base[4:]

if name_base:
for i in range(0, 32):
Expand Down

0 comments on commit 7f06214

Please sign in to comment.