Skip to content

Commit

Permalink
Fixed update_device method
Browse files Browse the repository at this point in the history
  • Loading branch information
samson0v committed Mar 20, 2024
1 parent 4550b6a commit 5451c3f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions thingsboard_gateway/gateway/tb_gateway_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -1424,6 +1424,8 @@ def add_device(self, device_name, content, device_type=None):

def update_device(self, device_name, event, content):
should_save = False
if self.__connected_devices.get(device_name) is None:
return
if event == 'connector' and self.__connected_devices[device_name].get(event) != content:
should_save = True
self.__connected_devices[device_name][event] = content
Expand Down

0 comments on commit 5451c3f

Please sign in to comment.