added query to second bridge

This commit is contained in:
mischa 2019-12-27 15:47:49 +01:00
parent 9e17dec64a
commit ac86e52f86
1 changed files with 6 additions and 2 deletions

View File

@ -6,7 +6,11 @@ PATH=$PATH:/usr/local/bin
# @daily /<path-to-your-script>/wrapper-sensors-battery.sh
#
result=$(/home/mischa/hue/get-sensors.py $(cat /home/mischa/hue-bridge) $(cat /home/mischa/hue-token) -b 20)
result2=$(/home/mischa/hue/get-sensors.py $(cat /home/mischa/hue-bridge2) $(cat /home/mischa/hue-token2) -b 20)
if [ -n "$result" ]; then
echo "${result}" | mail -s "Hue Battery Status" $(cat /home/mischa/hue-email)
if [[ -n "$result" ]]; then
echo "${result}" | mail -s "Hue Battery Status $(cat /home/mischa/hue-bridge)" $(cat /home/mischa/hue-email)
fi
if [[ -n "$result2" ]]; then
echo "${result2}" | mail -s "Hue Battery Status $(cat /home/mischa/hue-bridge2)" $(cat /home/mischa/hue-email)
fi