platypush/platypush/plugins/light/__init__.py

27 lines
536 B
Python
Raw Normal View History

2017-11-03 20:08:17 +01:00
from .. import Plugin
class LightPlugin(Plugin):
2018-06-25 00:49:45 +02:00
"""
Abstract plugin to interface your logic with lights/bulbs.
"""
2017-11-03 20:08:17 +01:00
def on(self):
2018-06-25 00:49:45 +02:00
""" Turn the light on """
2017-11-03 20:08:17 +01:00
raise NotImplementedError()
def off(self):
2018-06-25 00:49:45 +02:00
""" Turn the light off """
2017-11-03 20:08:17 +01:00
raise NotImplementedError()
def toggle(self):
2018-06-25 00:49:45 +02:00
""" Toggle the light status (on/off) """
2017-11-03 20:08:17 +01:00
raise NotImplementedError()
def status(self):
2018-06-25 00:49:45 +02:00
""" Get the light status """
2017-11-03 20:08:17 +01:00
raise NotImplementedError()
# vim:sw=4:ts=4:et: