Update temp.inc.sh

This commit is contained in:
2024-11-04 18:17:27 -06:00
parent 47772b3d80
commit 4adec4f2f6

View File

@@ -957,8 +957,7 @@ CHECKTEMP_SERVICE_RUNSENSOR(){
IFS='~' read -r token key <<< ${PW_SENSOR_DEVICEID[${1}]}; unset IFS
info=$(midea-beautiful-air-cli status --ip ${PW_REMOTE_SENSORS[${1}]} --token ${token} --key ${key})
temp_c=$(echo "${info}" | grep indoor | awk ' {print $3}')
target=$(echo "scale=2; $(echo "${info}" | grep target | awk ' {print $3}')/1" | bc -l)
target=$(bc <<< "scale=2; ($(echo "${info}" | grep target | awk ' {print $3}')*(9/5))+32")
elif [ "${PW_SENSOR_TYPE[${SENSOR}]}" == "lacrosse" ]; then
INFO=$(curl -m 5 -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 | jq)