Update power.inc.sh

This commit is contained in:
2024-10-22 22:22:38 -05:00
parent a857f630bd
commit 9b2a897499

View File

@@ -1356,6 +1356,7 @@ OFFSITE_SENDPOWER(){
}
GET_TUYA_POWER(){
echo "HERE: $1"
INFO=$(curl -m 3 -s http://${PW_REMOTE_SENSORS[${1}]}:8888/status/${PW_SENSOR_DEVICEID[${1}]} | jq '.dps')
if [ "${INFO}" != "" ]; then
WATT=-1
@@ -1379,6 +1380,7 @@ GET_TUYA_POWER(){
fi
[ "${WATT}" != "-1" ] && echo "${AMP}:${WATT}:${VOLT}" || echo "0:0:0"
fi
echo
}