update
This commit is contained in:
@@ -5,7 +5,7 @@ sys.path.insert(0, os.path.abspath('/opt/pylacrossapi'))
|
||||
from pylacrossapi import lacrosse
|
||||
|
||||
device_id = sys.argv[1]
|
||||
unit_measure = 0
|
||||
unit_measure = 1
|
||||
time_zone = 2
|
||||
|
||||
device1 = lacrosse(device_id,unit_measure,time_zone)
|
||||
|
||||
@@ -106,6 +106,9 @@ CHECKTEMPSENSOR(){
|
||||
mqtt_message=`${mqtt_conn} -t tele/${1}/SENSOR -C 1`
|
||||
echo ${mqtt_message} | cut -d':' -f 6 | cut -d',' -f 1 | read temp_c
|
||||
|
||||
elif [ "${PW_SENSOR_TYPE[${1}]}" == "lacrosse" ]; then
|
||||
temp_c=$(GET_LACROSSE_INFO "${PW_LACROSSE_ID[${1}]}")
|
||||
|
||||
elif [ "${PW_SENSOR_TYPE[${1}]}" == "system" ]; then
|
||||
temp_c=$(vcgencmd measure_temp)
|
||||
temp_c=${temp_c%\'*}; temp_c=${temp_c#*=}
|
||||
@@ -514,7 +517,7 @@ DAILYTEMP(){
|
||||
done
|
||||
}
|
||||
|
||||
GET_TASMOTA_INFO(){
|
||||
GET_LACROSSE_INFO(){
|
||||
|
||||
INFO=$(/bin/python3 ${PW_INCFOLDER}/getInfo.lacrosse.py "${PW_LACROSSE_ID[${1}]}" | sed -e "s/\[{'//g" | sed -e "s/}\]//g" | sed -e "s/', '/~/g" | sed -e "s/': '/:/g" | sed -e "s/': /:/g")
|
||||
IFS=$'~'; read -rd '' -a INFO <<<"${INFO}"; unset IFS
|
||||
|
||||
Reference in New Issue
Block a user