Update temp.inc.sh

This commit is contained in:
2024-02-24 10:06:17 -06:00
parent 9c07d9ecc6
commit fbf79cd10e

View File

@@ -147,8 +147,13 @@ CHECKTEMP(){
c=0; spc=''; spc1=`expr ${fws} - ${#tmp}`; until [ ${c} = ${spc1} ]; do spc="${spc} "; c=`expr ${c} + 1`; done
[ ${#temp_warn} == 2 ] && spcw=' ' || spcw=' '
[ ${#temp_crit} == 2 ] && spcc=' ' || spcc=' '
echo -e "${idsCL[Default]}${spc}[${spcw}${idsCL[Yellow]}${temp_warn_disp}${GAUGESH}${idsCL[Default]} /${spcc}${idsCL[LightRed]}${temp_crit_disp}${GAUGESH}=>${idsCL[Default]} ]"
[ "${PW_SENSOR_TYPE[${SENSOR}]}" == "lacrosse" ] && [[ "${SENSOR}" != *"-ProbeXXX" ]] && echo -e " - $(echo ${INFO} | jq -r '.device0 .obs[].timestamp')" || echo
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
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')"
else
echo
fi
else
echo -e "${idsCL[Default]}"
fi