diff --git a/packages/core/threads/thingsboard_thread.py b/packages/core/threads/thingsboard_thread.py index b8e878a9..178ff31d 100644 --- a/packages/core/threads/thingsboard_thread.py +++ b/packages/core/threads/thingsboard_thread.py @@ -121,4 +121,8 @@ def main(headless: bool = False) -> None: logger.exception(e) logger.info("Failed to publish last telemetry data.") - time.sleep(config.thingsboard.seconds_per_publish_interval or 60) + if config.thingsboard is not None: + if config.thingsboard.seconds_per_publish_interval is None: + time.sleep(60) + else: + time.sleep(config.thingsboard.seconds_per_publish_interval)