Update temp.inc.sh
This commit is contained in:
@@ -126,6 +126,15 @@ CHECKTEMP(){
|
|||||||
c=0; spct=''; [ "${PW_SENSOR_TYPE[${SENSOR}]}" == "system" ] && [[ "${SENSOR}" = *"FAN"* ]] && spc1=`expr 6 - ${#temp_f}` || spc1=`expr 7 - ${#temp_f}`
|
c=0; spct=''; [ "${PW_SENSOR_TYPE[${SENSOR}]}" == "system" ] && [[ "${SENSOR}" = *"FAN"* ]] && spc1=`expr 6 - ${#temp_f}` || spc1=`expr 7 - ${#temp_f}`
|
||||||
until [ ${c} = ${spc1} ]; do spct="${spct} "; c=`expr ${c} + 1`; done
|
until [ ${c} = ${spc1} ]; do spct="${spct} "; c=`expr ${c} + 1`; done
|
||||||
reading="${lclr}${lmd}${spct}${temp_f_disp}${GAUGESH}"
|
reading="${lclr}${lmd}${spct}${temp_f_disp}${GAUGESH}"
|
||||||
|
|
||||||
|
if [ -f ${PW_TMPFOLDER}/.lastfancheck/${SENSOR}.old ]; then
|
||||||
|
if [ $(bc -l <<< "$(cat ${PW_TMPFOLDER}/.lastfancheck/${SENSOR}.old | cut -d'~' -f 1) < ${temp_f}") -eq 1 ]; then
|
||||||
|
reading="${reading}${idsCL[LightRed]}\u2B06"
|
||||||
|
elif [ $(bc -l <<< "${temp_f} < $(cat ${PW_TMPFOLDER}/.lastfancheck/${SENSOR}.old | cut -d'~' -f 1)") -eq 1 ]; then
|
||||||
|
reading="${reading}${idsCL[LightGreen]}\u2B07"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
else
|
else
|
||||||
temp_f_disp=" "
|
temp_f_disp=" "
|
||||||
lclr="${idsCL[Yellow]}"
|
lclr="${idsCL[Yellow]}"
|
||||||
@@ -172,12 +181,14 @@ CHECKTEMP(){
|
|||||||
[ ${#temp_crit} == 2 ] && spcc=' ' || spcc=' '
|
[ ${#temp_crit} == 2 ] && spcc=' ' || spcc=' '
|
||||||
echo -en
|
echo -en
|
||||||
echo -en "${idsCL[Default]}${spc}[${spcw}${idsCL[Yellow]}${temp_warn_disp}${GAUGESH}${idsCL[Default]} /${spcc}${idsCL[LightRed]}${temp_crit_disp}${GAUGESH}=>${idsCL[Default]} ]"
|
echo -en "${idsCL[Default]}${spc}[${spcw}${idsCL[Yellow]}${temp_warn_disp}${GAUGESH}${idsCL[Default]} /${spcc}${idsCL[LightRed]}${temp_crit_disp}${GAUGESH}=>${idsCL[Default]} ]"
|
||||||
|
|
||||||
if [ "${PW_SENSOR_TYPE[${SENSOR}]}" == "lacrosse" ] && [[ "${SENSOR}" != *"-ProbeXXX" ]]; then
|
if [ "${PW_SENSOR_TYPE[${SENSOR}]}" == "lacrosse" ] && [[ "${SENSOR}" != *"-ProbeXXX" ]]; then
|
||||||
INFO=$(curl -m 8 -s --get -d "deviceid=${PW_SENSOR_DEVICEID[${SENSOR}]}" -d "limit=1" -d "metric=1" -d "timezone=2" https://decent-destiny-704.appspot.com/laxservices/device_info.php)
|
INFO=$(curl -m 8 -s --get -d "deviceid=${PW_SENSOR_DEVICEID[${SENSOR}]}" -d "limit=1" -d "metric=1" -d "timezone=2" https://decent-destiny-704.appspot.com/laxservices/device_info.php)
|
||||||
echo -e " - $(echo ${INFO} | jq -r '.device0 .obs[].timestamp')"
|
echo -e " - $(echo ${INFO} | jq -r '.device0 .obs[].timestamp')"
|
||||||
else
|
else
|
||||||
echo
|
echo
|
||||||
fi
|
fi
|
||||||
|
|
||||||
else
|
else
|
||||||
echo -e "${idsCL[Default]}"
|
echo -e "${idsCL[Default]}"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user