craftbeerpi4-pione/core/api/actor.py
2018-12-13 21:45:33 +01:00

48 lines
No EOL
800 B
Python

from abc import ABCMeta
__all__ = ["CBPiActor"]
import logging
from core.api.extension import CBPiExtension
logger = logging.getLogger(__file__)
class CBPiActor(CBPiExtension, metaclass=ABCMeta):
def init(self):
pass
def stop(self):
pass
def on(self, power):
'''
Code to switch the actor on. Power is provided as integer value
:param power: power value between 0 and 100
:return: None
'''
pass
def off(self):
'''
Code to switch the actor off
:return: None
'''
pass
def state(self):
'''
Return the current actor state
:return:
'''
pass
def reprJSON(self):
return dict(state=True)