Skip to content

Commit

Permalink
Merge pull request #65 from samson0v/master
Browse files Browse the repository at this point in the history
Fixed getting device from message
  • Loading branch information
samson0v authored Jun 17, 2024
2 parents f403cc7 + 731dcd8 commit 9b68ae9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tb_device_mqtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -895,7 +895,7 @@ def _count_datapoints_in_message(data, device=None):
for data_object in data[device]:
datapoints += TBDeviceMqttClient._count_datapoints_in_message(data_object) # noqa
else:
datapoints += TBDeviceMqttClient._count_datapoints_in_message(data[device]) # noqa
datapoints += TBDeviceMqttClient._count_datapoints_in_message(data.get(device, data.get('device')))
else:
if isinstance(data, dict):
datapoints += TBDeviceMqttClient._get_data_points_from_message(data)
Expand Down

0 comments on commit 9b68ae9

Please sign in to comment.