#!/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