Created
March 15, 2021 19:12
-
-
Save kopiro/cafc5f1d0ddf219d61e021a82d995ae2 to your computer and use it in GitHub Desktop.
Switch a Philips Hue group on/off
This file contains hidden or 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/bash | |
key='' | |
url="http://Philips-Hue.local/api/$key/groups/3" | |
/usr/bin/curl "$url/action" -X PUT -d "{\"on\":$(/usr/bin/curl "$url" | /usr/local/bin/jq "if (.state.all_on) then false else true end")}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment