diff --git a/thingsboard_gateway/gateway/tb_gateway_service.py b/thingsboard_gateway/gateway/tb_gateway_service.py index fb818c5e..ac2eef53 100644 --- a/thingsboard_gateway/gateway/tb_gateway_service.py +++ b/thingsboard_gateway/gateway/tb_gateway_service.py @@ -1425,6 +1425,8 @@ class TBGatewayService: 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