hue/wrapper-sensors-battery.sh

13 lines
384 B
Bash
Raw Normal View History

2019-11-06 22:07:26 +01:00
#!/bin/sh
PATH=$PATH:/usr/local/bin
#
# Easy invocation of python script
# Add the following to crontab:
2019-11-06 22:18:42 +01:00
# @daily /<path-to-your-script>/wrapper-sensors-battery.sh
2019-11-06 22:07:26 +01:00
#
2019-11-07 00:36:13 +01:00
result=$(/home/mischa/hue/get-sensors.py $(cat /home/mischa/hue-bridge) $(cat /home/mischa/hue-token) -b 20)
if [ -n "$result" ]; then
echo "${result}" | mail -s "Hue Battery Status" $(cat /home/mischa/hue-email)
fi