nightscout mit offline erkennung

This commit is contained in:
Michael Grote 2021-06-08 18:00:20 +02:00
parent 28014c6061
commit 50bef56ace

View file

@ -1,2 +1,7 @@
#!/bin/bash
curl -s -X GET "https://nightscout.mgrote.net/api/v1/entries/sgv?count=1&token=polybar-ae6fe2720f2c30f4" > /dev/null
if [ $? -ne 0 ]; then
echo "---"
else
curl -s -X GET "https://nightscout.mgrote.net/api/v1/entries/sgv?count=1&token=polybar-ae6fe2720f2c30f4" | awk '{$zw=$3 * 0.0555} {printf "%.1f\n",$zw}'
fi