Update temp.inc.sh
This commit is contained in:
@@ -348,6 +348,7 @@ CHECKTEMPSENSOR(){
|
|||||||
if [ "${PW_SENSOR_TYPE[${1}]}" == "mqtt" ]; then
|
if [ "${PW_SENSOR_TYPE[${1}]}" == "mqtt" ]; then
|
||||||
if ! mqtt_message=`${mqtt_conn} -t tele/${1}/SENSOR -C 1` ; then TIMEOUT=1; fi
|
if ! mqtt_message=`${mqtt_conn} -t tele/${1}/SENSOR -C 1` ; then TIMEOUT=1; fi
|
||||||
echo ${mqtt_message} | cut -d':' -f 6 | cut -d',' -f 1 | read temp_c
|
echo ${mqtt_message} | cut -d':' -f 6 | cut -d',' -f 1 | read temp_c
|
||||||
|
echo ${mqtt_message} | cut -d':' -f 7 | cut -d',' -f 1 | read temp_h
|
||||||
|
|
||||||
elif [ "${PW_SENSOR_TYPE[${1}]}" == "tuya" ]; then
|
elif [ "${PW_SENSOR_TYPE[${1}]}" == "tuya" ]; then
|
||||||
IFS=: read -r temp_c temp_h <<< $(GET_TUYA_TEMP ${1}); unset IFS
|
IFS=: read -r temp_c temp_h <<< $(GET_TUYA_TEMP ${1}); unset IFS
|
||||||
|
|||||||
Reference in New Issue
Block a user