Added lights base plugin

This commit is contained in:
Fabio Manganiello 2017-11-03 20:08:17 +01:00
parent 50574dc022
commit fde7f20e7d
1 changed files with 28 additions and 0 deletions

View 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: