Open andrewheiss opened 2 weeks ago
The utility can't read the current state of the light from the device, however some state information is stored in a config file as the utility is used (i.e., preset settings and current settings for brightness and temp). It doesn't track the on/off state, but it can be added and used to implement a toggle function.
Thanks for this tool! It makes working with the Litra so much easier!
I'm interested in using the CLI command to toggle the light with a global keyboard shortcut (like with Raycast or Alfred on macOS).
Right now, I have two separate shell script wrappers: one to run
lcli on
and one to runlcli off
. There is nolcli toggle
option (or equivalent) command, so I tried to create conditional logic within a shell script, looking at the output to determine if the previous command turned the light on or off, but the message is the same for both commands:Is there a way to get the current status of the light for working with conditional logic in other applications?
Or more simply, I'd love to be able to use one of these approaches:
lcli toggle
, wherelcli
handles the conditional parts of checking if the light is on/off and doing the reverseLight status: Something like
lcli status
wherelcli
emits diagnostic information about what the light is doing. Perhaps something like this?When off:
When on: