change dummy logic

This commit is contained in:
Manuel Fritsch 2021-02-06 20:09:01 +01:00
parent fb61429266
commit 68fc73cc25
2 changed files with 5 additions and 7 deletions

View file

@ -25,7 +25,6 @@ class CBPiKettleLogic(metaclass=ABCMeta):
async def run(self): async def run(self):
self.state = True self.state = True
while self.running: while self.running:
print("RUNNING KETTLE")
await asyncio.sleep(1) await asyncio.sleep(1)
self.state = False self.state = False

View file

@ -5,12 +5,11 @@ from cbpi.api import *
@parameters([]) @parameters([])
class CustomLogic(CBPiKettleLogic): class CustomLogic(CBPiKettleLogic):
pass async def run(self):
self.state = True
@action(key="test", parameters=[]) while self.running:
async def action1(self, **kwargs): await asyncio.sleep(1)
print("ACTION") self.state = False