From ba7dc56bc08a03015ae5017befc007acb9a037c1 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 15 Dec 2024 17:24:45 +0100 Subject: [PATCH] Add suspend variable --- piusv/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/piusv/__init__.py b/piusv/__init__.py index 191ef68c4..a203d7e90 100755 --- a/piusv/__init__.py +++ b/piusv/__init__.py @@ -54,6 +54,7 @@ def __init__(self, sh): self._item_dict = {} self._cyclic_update_active = False self.alive = False + self.suspended = False # check if shNG is running on Raspberry Pi try: @@ -189,6 +190,9 @@ def poll_device(self): if self._cyclic_update_active: self.logger.warning('Triggered cyclic poll_device, but previous cyclic run is still active. Therefore request will be skipped.') return + elif self.suspended: + self.logger.warning('Triggered cyclic poll_device, but Plugin in suspended. Therefore request will be skipped.') + return else: self.logger.info('Triggering cyclic poll_device')