Last active
February 15, 2021 23:04
-
-
Save kinncj/959d82c8a20a8e99c6bad05d40f3182b to your computer and use it in GitHub Desktop.
elgato linux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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