Added lights base plugin
This commit is contained in:
parent
50574dc022
commit
fde7f20e7d
1 changed files with 28 additions and 0 deletions
28
runbullet/plugins/light/__init__.py
Normal file
28
runbullet/plugins/light/__init__.py
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
from .. import Plugin
|
||||||
|
|
||||||
|
class LightPlugin(Plugin):
|
||||||
|
def run(self, args):
|
||||||
|
if 'on' in args and args['on']:
|
||||||
|
self.on()
|
||||||
|
elif 'off' in args and args['off']:
|
||||||
|
self.off()
|
||||||
|
elif 'toggle' in args and args['toggle']:
|
||||||
|
self.toggle()
|
||||||
|
|
||||||
|
return self.status()
|
||||||
|
|
||||||
|
def on(self):
|
||||||
|
raise NotImplementedError()
|
||||||
|
|
||||||
|
def off(self):
|
||||||
|
raise NotImplementedError()
|
||||||
|
|
||||||
|
def toggle(self):
|
||||||
|
raise NotImplementedError()
|
||||||
|
|
||||||
|
def status(self):
|
||||||
|
raise NotImplementedError()
|
||||||
|
|
||||||
|
|
||||||
|
# vim:sw=4:ts=4:et:
|
||||||
|
|
Loading…
Reference in a new issue