craftbeerpi4-pione/cbpi/extension/dummylogic/__init__.py

28 lines
470 B
Python
Raw Normal View History

2018-11-18 15:40:10 +01:00
import asyncio
2019-01-05 20:43:48 +01:00
from cbpi.api import *
2018-11-18 15:40:10 +01:00
2021-01-30 22:29:33 +01:00
@parameters([])
2021-01-23 14:41:26 +01:00
class CustomLogic(CBPiKettleLogic):
2018-11-18 15:40:10 +01:00
2021-01-22 23:25:20 +01:00
pass
2018-11-18 23:09:17 +01:00
2021-01-22 23:25:20 +01:00
@action(key="test", parameters=[])
async def action1(self, **kwargs):
print("ACTION")
2018-12-29 00:27:19 +01:00
2018-11-18 23:09:17 +01:00
2018-11-18 15:40:10 +01:00
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)