Skip to content

Instantly share code, notes, and snippets.

@kinncj
Last active February 15, 2021 23:04
Show Gist options
  • Save kinncj/959d82c8a20a8e99c6bad05d40f3182b to your computer and use it in GitHub Desktop.
Save kinncj/959d82c8a20a8e99c6bad05d40f3182b to your computer and use it in GitHub Desktop.
elgato linux
#!/bin/env python3
import leglight
import click
allLights = leglight.discover(2);
light = allLights[0];
__author__ = "kinncj"
@click.group()
def main():
"""
Elgato Ring Commandline
"""
pass
@main.command()
def toggle():
if light.isOn == 0:
light.on()
else:
light.off()
@main.command()
@click.argument('temp')
def temperature(temp):
light.color(int(temp))
@main.command()
@click.argument('bright')
def brightness(bright):
light.brightness(int(bright));
if __name__ == "__main__":
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment