This commit is contained in:
2024-08-22 21:59:52 -05:00
parent 195528d7c4
commit c0ac1bc29c
2 changed files with 7 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash
VERS='2.7.90-08222024'
VERS='2.7.91-08222024'
noheader=' update service dailytemp confsync -r -report test '

View File

@@ -655,8 +655,12 @@ CHECKTEMPSENSOR(){
if [ "${temp_c}" != "" ]; then
temp_f=`IDS_NUMBER_FORMAT ${temp_c} 2 yes`
temp_h=`IDS_NUMBER_FORMAT $(curl -m 8 -s GET -H "Authorization: Bearer ${PW_ESPHOME_API}" ${PW_HOMEASSISTANT_URL}/api/states/sensor.${PW_SENSOR_DEVICEID[${1}]}_humidity | jq -r '.state') 2 yes`
else
temp_c=''
fi
elif [ "${PW_SENSOR_TYPE[${1}]}" == "espdev" ]; then
if ! temp_c=$(curl -m 8 -s http://${PW_REMOTE_SENSORS[${1}]}:8090/sensor/${PW_SENSOR_DEVICEID[${1}]} | jq '.value'); then TIMEOUT=1; fi
if [ "${temp_c}" != "" ]; then
temp_h=`IDS_NUMBER_FORMAT $(curl -m 8 -s http://${PW_REMOTE_SENSORS[${1}]}:8090/sensor/${PW_SENSOR_DEVICEID[${1}]/temperature/humidity} | jq '.value') 2 yes`
fi
elif [ "${PW_SENSOR_TYPE[${1}]}" == "tuya" ]; then