Skip to content

Commit

Permalink
Updated regex to match array indices in paths.
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelHelbling authored Jan 22, 2025
1 parent 6e752e1 commit 0dc1d1b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions thingsboard_gateway/connectors/opcua/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ def load_values(self):
self.values[section].append(
{'path': child.groups()[0], 'key': node_config['key'],
REPORT_STRATEGY_PARAMETER: node_config.get(REPORT_STRATEGY_PARAMETER)})
elif re.search(r"\${([A-Za-z.:\\\d]+)}", node_config['value']):
child = re.search(r"\${([A-Za-z.:\\\d]+)", node_config['value'])
elif re.search(r"\${([A-Za-z.:\\\d\[\]]+)", node_config['value']):
child = re.search(r"\${([A-Za-z.:\\\d\[\]]+)", node_config['value'])
self.values[section].append(
{'path': self.path + child.groups()[0].split('\\.'), 'key': node_config['key'],
REPORT_STRATEGY_PARAMETER: node_config.get(REPORT_STRATEGY_PARAMETER)})
Expand Down

0 comments on commit 0dc1d1b

Please sign in to comment.