aboutsummaryrefslogtreecommitdiff
path: root/.scripts/light
blob: c8b1001199af884b9ba4bfc36eb52fb85c06eb21 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/env bash

if [ -n "$1" ]; then
    hueadm group 1 =0 &>/dev/null
    hueadm group 1 on &>/dev/null
    exit 0
fi

if [ "$(hueadm group -j 1 | jq .state.any_on)" = "true" ]; then
    hueadm group 1 off &>/dev/null
else
    hueadm group 1 reset &>/dev/null
fi