Update temp.inc.sh

This commit is contained in:
2024-10-28 22:12:50 -05:00
parent 14ddf3ff90
commit 791d9075cd

View File

@@ -15,13 +15,17 @@ GET_HOST_FANSPEED(){
START_POWERWALL_FAN(){
pwmconfig &
sleep 4s
killall pwmconfig
temp_c=$(cat ${PW_FANINPUT})
if [ ${temp_c} -gt 0 ]; then
fs=$(IDS_NUMBER_FORMAT ${temp_c})
SENDNOTICE "Starting up the ${SENSOR}" "Startup confirmed, the fan is now reading: ${fs}'RPM"
killall pwmconfig >/dev/null 2>&1
if [ -f ${PW_FANINPUT} ]; then
temp_c=$(cat ${PW_FANINPUT})
if [ ${temp_c} -gt 0 ]; then
fs=$(IDS_NUMBER_FORMAT ${temp_c})
SENDNOTICE "Starting up the ${SENSOR}" "Startup confirmed, the fan is now reading: ${fs}'RPM"
else
SENDNOTICE "FAILED to start ${SENSOR}" "Cannot start the fan, ERROR WILL ROBINSON!!!" 1
fi
else
SENDNOTICE "FAILED to start ${SENSOR}" "Cannot start the fan, ERROR WILL ROBINSON!!!"
SENDNOTICE "FAILED to start ${SENSOR}" "Cannot find hardware (${PW_FANINPUT}), ERROR ERROR ERROR... DOES NOT COMPUTE... YOU SUCK" 1
fi
}
CHECKTEMP(){