mirror of
https://github.com/PiBrewing/craftbeerpi4.git
synced 2024-12-23 14:04:58 +01:00
26 lines
495 B
Python
26 lines
495 B
Python
import asyncio
|
|
|
|
from cbpi.api import *
|
|
|
|
@parameters([])
|
|
class CustomLogic(CBPiKettleLogic):
|
|
|
|
async def run(self):
|
|
self.state = True
|
|
while self.running:
|
|
await asyncio.sleep(1)
|
|
self.state = False
|
|
|
|
|
|
|
|
def setup(cbpi):
|
|
|
|
'''
|
|
This method is called by the server during startup
|
|
Here you need to register your plugins at the server
|
|
|
|
:param cbpi: the cbpi core
|
|
:return:
|
|
'''
|
|
|
|
cbpi.plugin.register("CustomKettleLogic", CustomLogic)
|