diff --git a/inc/getInfo.lacrosse.py b/inc/getInfo.lacrosse.py index 247022af..58e7bc7a 100644 --- a/inc/getInfo.lacrosse.py +++ b/inc/getInfo.lacrosse.py @@ -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) diff --git a/inc/temp.inc.sh b/inc/temp.inc.sh index f22e0d08..715395a7 100644 --- a/inc/temp.inc.sh +++ b/inc/temp.inc.sh @@ -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