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

if [ "$1" = "alert" ]; then
    hueadm group 1 select &>/dev/null
    exit 0
elif [ -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