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(){ START_POWERWALL_FAN(){
pwmconfig & pwmconfig &
sleep 4s sleep 4s
killall pwmconfig killall pwmconfig >/dev/null 2>&1
temp_c=$(cat ${PW_FANINPUT}) if [ -f ${PW_FANINPUT} ]; then
if [ ${temp_c} -gt 0 ]; then temp_c=$(cat ${PW_FANINPUT})
fs=$(IDS_NUMBER_FORMAT ${temp_c}) if [ ${temp_c} -gt 0 ]; then
SENDNOTICE "Starting up the ${SENSOR}" "Startup confirmed, the fan is now reading: ${fs}'RPM" 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 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 fi
} }
CHECKTEMP(){ CHECKTEMP(){