This commit is contained in:
2023-12-14 17:01:18 -06:00
parent 2a8e8a91c9
commit 4a2d7046a3
2 changed files with 5 additions and 2 deletions

View File

@@ -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)

View File

@@ -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