From 949219db0622bd846fad8938d404035555ad5e28 Mon Sep 17 00:00:00 2001 From: avollkopf <43980694+avollkopf@users.noreply.github.com> Date: Sun, 21 Nov 2021 19:19:19 +0100 Subject: [PATCH] minor fix in kettle controller --- cbpi/__init__.py | 2 +- cbpi/controller/kettle_controller.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cbpi/__init__.py b/cbpi/__init__.py index 8ec8c56..7455d4e 100644 --- a/cbpi/__init__.py +++ b/cbpi/__init__.py @@ -1 +1 @@ -__version__ = "4.0.0.46" +__version__ = "4.0.0.47" diff --git a/cbpi/controller/kettle_controller.py b/cbpi/controller/kettle_controller.py index a97d75b..46a5afe 100644 --- a/cbpi/controller/kettle_controller.py +++ b/cbpi/controller/kettle_controller.py @@ -37,7 +37,8 @@ class KettleController(BasicController): try: logging.info("Stop Kettele {}".format(id)) item = self.find_by_id(id) - await item.instance.stop() + if item.instance: + await item.instance.stop() await self.push_udpate() except Exception as e: logging.error("Failed to switch off KettleLogic {} {}".format(id, e))