From 68fc73cc259f04f01170698c6cbbef3b5b66072f Mon Sep 17 00:00:00 2001 From: Manuel Fritsch Date: Sat, 6 Feb 2021 20:09:01 +0100 Subject: [PATCH] change dummy logic --- cbpi/api/kettle_logic.py | 1 - cbpi/extension/dummylogic/__init__.py | 11 +++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/cbpi/api/kettle_logic.py b/cbpi/api/kettle_logic.py index 580d4a3..f4a6af9 100644 --- a/cbpi/api/kettle_logic.py +++ b/cbpi/api/kettle_logic.py @@ -25,7 +25,6 @@ class CBPiKettleLogic(metaclass=ABCMeta): async def run(self): self.state = True while self.running: - print("RUNNING KETTLE") await asyncio.sleep(1) self.state = False diff --git a/cbpi/extension/dummylogic/__init__.py b/cbpi/extension/dummylogic/__init__.py index 8c092a5..9933f74 100644 --- a/cbpi/extension/dummylogic/__init__.py +++ b/cbpi/extension/dummylogic/__init__.py @@ -5,12 +5,11 @@ from cbpi.api import * @parameters([]) class CustomLogic(CBPiKettleLogic): - pass - - @action(key="test", parameters=[]) - async def action1(self, **kwargs): - print("ACTION") - + async def run(self): + self.state = True + while self.running: + await asyncio.sleep(1) + self.state = False