added corridor light
This commit is contained in:
parent
3e1ea6ac4e
commit
358b415566
1 changed files with 19 additions and 0 deletions
|
@ -60,6 +60,25 @@ import struct
|
||||||
# else:
|
# else:
|
||||||
# reply("fatal error")
|
# reply("fatal error")
|
||||||
|
|
||||||
|
@hook.command("corridor_light_toggle", autohelp=False)
|
||||||
|
def cmd_corridor_light_toggle(inp, reply=None):
|
||||||
|
"""toggle corridor light modes"""
|
||||||
|
reply(check_output("echo corridor_light_toggle | ssh -q -p 2322 command@127.0.0.1", shell=True).strip("\n").decode("utf-8"))
|
||||||
|
|
||||||
|
@hook.command("corridor_light", autohelp=False)
|
||||||
|
def cmd_corridor_light(inp, reply=None):
|
||||||
|
"""set corridor light color"""
|
||||||
|
args = inp.split(" ")
|
||||||
|
if len(args) < 1:
|
||||||
|
reply("corridor_light color - set the light color")
|
||||||
|
return
|
||||||
|
|
||||||
|
if len(args[0]) != 6:
|
||||||
|
reply("corridor_light color - set the light color")
|
||||||
|
return
|
||||||
|
|
||||||
|
reply(check_output("echo corridor_light " + args[0] + " | ssh -q -p 2322 command@127.0.0.1", shell=True).strip("\n").decode("utf-8"))
|
||||||
|
|
||||||
@hook.command("lounge_light_toggle", autohelp=False)
|
@hook.command("lounge_light_toggle", autohelp=False)
|
||||||
def cmd_lounge_light_toggle(inp, reply=None):
|
def cmd_lounge_light_toggle(inp, reply=None):
|
||||||
"""toggle lounge light modes"""
|
"""toggle lounge light modes"""
|
||||||
|
|
Reference in a new issue