api/_common/Light: add reset to system behavior

This makes lights behave as they would if the user script did not use them at all.
This commit is contained in:
Laurens Valk
2020-07-07 09:44:16 +02:00
committed by laurensvalk
parent 38a1cf9712
commit 7d1fbe9ce9
+16 -2
View File
@@ -422,6 +422,11 @@ class Light:
time (:ref:`time`): Duration of the pattern.
"""
def reset(self):
"""Resets the light to the default system behavior."""
# This method is exposed on system lights only.
pass
class ColorLight:
"""Control a multi-color light."""
@@ -468,6 +473,11 @@ class ColorLight:
time (:ref:`time`): Duration of the pattern.
"""
def reset(self):
"""Resets the light to the default system behavior."""
# This method is exposed on system lights only.
pass
class LightArray:
"""Control an array of single-color lights."""
@@ -587,11 +597,15 @@ class LightGrid:
Arguments:
character (str): The character or symbol to be displayed.
time (:ref:`time`): How long to show a character before showing
the next one.
pause (:ref:`time`): How long to show a character before showing
the next one.
"""
pass
def reset(self):
"""Resets the light grid to the default system behavior."""
pass
class KeyPad:
"""Get status of buttons on a keypad layout."""