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..3c26a95 100644 --- a/cbpi/controller/kettle_controller.py +++ b/cbpi/controller/kettle_controller.py @@ -35,9 +35,10 @@ class KettleController(BasicController): async def stop(self, id): try: - logging.info("Stop Kettele {}".format(id)) + logging.info("Stop Kettle {}".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))