Ok, maybe if I post the entire flow all the variable senti in. I need to split the code in two. Part 1 of 2.
[{"id":"dde1f6803602fab5","type":"function","z":"d0a0029743190dc0","name":"Validate Inputs","func":"// Define constants\nconst LATITUDE = 45.7731224;\nconst ELEVATION = 13;\n\n// Get inputs from msg or environment\n// let inputData;\n// try {\n// inputData = (typeof msg.payload === 'string') ? JSON.parse(msg.payload) : msg.payload;\n// } catch (e) {\n// return { payload: { error: 'Invalid JSON input' } };\n// }\n\n// const temp = inputData.temperature;\nconst temp = global.get(\"temperature\");\n// const solar = inputData.solarRadiation;\nconst solar = global.get(\"solarRadiation\");\n// const rh = inputData.relativeHumidity;\nconst rh = global.get(\"relativeHumidity\");\n// const wind = inputData.windSpeed;\nconst wind = global.get(\"windSpeed\");\n\n// Input validation\nif (temp === undefined || typeof temp !== 'number' || temp < -50 || temp > 60) {\n return { payload: { error: 'Invalid temperature. Must be between -50°C and 60°C' } };\n}\n\nif (solar === undefined || typeof solar !== 'number' || solar < 0 || solar > 1500) {\n return { payload: { error: 'Invalid solar radiation. Must be between 0 and 1500 W/m²' } };\n}\n\nif (rh === undefined || typeof rh !== 'number' || rh < 0 || rh > 100) {\n return { payload: { error: 'Invalid relative humidity. Must be between 0% and 100%' } };\n}\n\nif (wind === undefined || typeof wind !== 'number' || wind < 0 || wind > 100) {\n return { payload: { error: 'Invalid wind speed. Must be between 0 and 100 m/s' } };\n}\n\n// If all inputs are valid, pass them along with constants\nmsg.payload = {\n temperature: temp,\n solarRadiation: solar,\n relativeHumidity: rh,\n windSpeed: wind,\n latitude: LATITUDE,\n elevation: ELEVATION\n};\n\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":480,"y":520,"wires":[["c62a0881ebd5b74d"]]},{"id":"03b4607f42b375ef","type":"function","z":"d0a0029743190dc0","name":"Format Output","func":"try {\n if (msg.payload.error) {\n node.status({fill:\"red\",shape:\"ring\",text:msg.payload.error});\n // Add error logging here if needed\n } else {\n node.status({fill:\"green\",shape:\"dot\",text:\"ET: \" + msg.payload.ET + \" mm/day\"});\n }\n return msg;\n} catch (error) {\n node.status({fill:\"red\",shape:\"ring\",text:\"Error in output formatting\"});\n return { payload: { error: 'Output formatting error', details: error.message } };\n}","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":1040,"y":520,"wires":[["adf9e1769d5e05b2","7e2e3f234f0a0dd7","f5697da887a54c75"]]},{"id":"adf9e1769d5e05b2","type":"debug","z":"d0a0029743190dc0","name":"Debug Output","active":false,"tosidebar":true,"console":true,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1720,"y":520,"wires":[]},{"id":"c62a0881ebd5b74d","type":"function","z":"d0a0029743190dc0","name":"Calculate ET","func":"try {\n // Function to calculate day of year\n function getDayOfYear(date) {\n const start = new Date(date.getFullYear(), 0, 0);\n const diff = (date.getTime() - start.getTime());\n const oneDay = 1000 * 60 * 60 * 24;\n return Math.floor(diff / oneDay);\n }\n\n // Constants\n const SOLAR_CONSTANT = 0.0820; // MJ m-2 min-1\n const STEFAN_BOLTZMANN = 4.903e-9; // MJ K-4 m-2 day-1\n const ATMOSPHERIC_PRESSURE = 101.3 * Math.pow((293 - 0.0065 * msg.payload.elevation) / 293, 5.26);\n const PSYCHROMETRIC_CONSTANT = 0.000665 * ATMOSPHERIC_PRESSURE;\n\n // Get current day of year\n const currentDate = new Date();\n const j = getDayOfYear(currentDate);\n\n // Convert inputs to required units\n const tempC = msg.payload.temperature;\n const tempK = tempC + 273.16;\n const solar = msg.payload.solarRadiation * 0.0864; // Convert W/m² to MJ/m²/day\n const rh = msg.payload.relativeHumidity / 100;\n const wind = msg.payload.windSpeed;\n\n // Calculate saturation vapor pressure\n const es = 0.6108 * Math.exp(17.27 * tempC / (tempC + 237.3));\n\n // Calculate actual vapor pressure\n const ea = es * rh;\n\n // Calculate slope of saturation vapor pressure curve\n const delta = 4098 * es / Math.pow(tempC + 237.3, 2);\n\n // Calculate net radiation\n const dr = 1 + 0.033 * Math.cos(2 * Math.PI / 365 * j);\n const phi = msg.payload.latitude * Math.PI / 180;\n const delta_solar = 0.409 * Math.sin(2 * Math.PI / 365 * j - 1.39);\n \n // Check for valid solar angle calculation\n const tanPhi = Math.tan(phi);\n const tanDelta = Math.tan(delta_solar);\n const angleProduct = -tanPhi * tanDelta;\n \n if (angleProduct >= 1 || angleProduct <= -1) {\n throw new Error('Invalid solar angle calculation: latitude or day of year out of valid range');\n }\n \n const ws = Math.acos(angleProduct);\n\n const Ra = 24 * 60 / Math.PI * SOLAR_CONSTANT * dr * \n (ws * Math.sin(phi) * Math.sin(delta_solar) + \n Math.cos(phi) * Math.cos(delta_solar) * Math.sin(ws));\n\n const Rso = (0.75 + 2e-5 * msg.payload.elevation) * Ra;\n const Rns = (1 - 0.23) * solar;\n \n // Add check for division by zero\n if (Rso === 0) {\n throw new Error('Solar radiation calculation error: Rso is zero');\n }\n \n const Rnl = STEFAN_BOLTZMANN * Math.pow(tempK, 4) * \n (0.34 - 0.14 * Math.sqrt(ea)) * (1.35 * solar / Rso - 0.35);\n const Rn = Rns - Rnl;\n\n // Calculate soil heat flux (assumed negligible for daily calculation)\n const G = 0;\n\n // Calculate reference ET (FAO Penman-Monteith)\n const numerator = 0.408 * delta * (Rn - G) + \n PSYCHROMETRIC_CONSTANT * 900 / (tempK) * wind * (es - ea);\n const denominator = delta + PSYCHROMETRIC_CONSTANT * (1 + 0.34 * wind);\n \n if (denominator === 0) {\n throw new Error('Division by zero in ET calculation');\n }\n \n const ET = numerator / denominator;\n\n // Error check the result\n // if (isNaN(ET) || ET < 0 || ET > 15) {\n // return { payload: {\n // error: 'Calculated ET is outside reasonable bounds',\n // ET: ET,\n // details: 'ET should be between 0 and 15 mm/day'\n // }};\n // }\n\n msg.payload = {\n ET: parseFloat(ET.toFixed(2)),\n timestamp: currentDate.toISOString(),\n dayOfYear: j,\n inputs: {\n temperature: tempC,\n solarRadiation: msg.payload.solarRadiation,\n relativeHumidity: rh * 100,\n windSpeed: wind\n },\n intermediateValues: {\n saturationVaporPressure: parseFloat(es.toFixed(3)),\n actualVaporPressure: parseFloat(ea.toFixed(3)),\n netRadiation: parseFloat(Rn.toFixed(2)),\n solarRadiationConverted: parseFloat(solar.toFixed(2)),\n dayAngle: parseFloat(dr.toFixed(4)),\n sunsetHourAngle: parseFloat(ws.toFixed(4)),\n extraterrestrialRadiation: parseFloat(Ra.toFixed(2))\n }\n };\n\n return msg;\n} catch (error) {\n return { payload: { \n error: 'Calculation error', \n details: error.message,\n timestamp: new Date().toISOString()\n }};\n}","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":710,"y":520,"wires":[["03b4607f42b375ef"]]},{"id":"f58041629c8aa183","type":"api-get-history","z":"d0a0029743190dc0","name":"Temp °C History 24 h","server":"6a3c3921969e85fe","version":1,"startDate":"","endDate":"","entityId":"sensor.gw2000a_outdoor_temperature","entityIdType":"equals","useRelativeTime":true,"relativeTime":"24 h","flatten":true,"outputType":"array","outputLocationType":"msg","outputLocation":"payload","x":360,"y":120,"wires":[["b880048a7a4525f4"]]},{"id":"aa12511a165a7c45","type":"inject","z":"d0a0029743190dc0","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":"5","topic":"","payload":"","payloadType":"date","x":100,"y":40,"wires":[["1e9701a9f00475cf"]]},{"id":"f631997554862ae3","type":"function","z":"d0a0029743190dc0","name":"Calculate Mean","func":"// Get the array of numbers from input\nlet numbers = msg.payload;\n\nif (!Array.isArray(numbers)) {\n node.error(\"Input must be an array of numbers\");\n return null;\n}\n\n// Calculate mean\nlet sum = numbers.reduce((a, b) => a + b, 0);\nlet mean = sum / numbers.length;\n\n// Create output message\n// msg.payload = {\n// original: numbers,\n// mean: mean,\n// count: numbers.length\n// };\n\nmsg.payload = mean\n\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":1040,"y":120,"wires":[["d0ffbfe6b4693a1e"]]},{"id":"3594d0dc7f8541bd","type":"api-get-history","z":"d0a0029743190dc0","name":"Solar Rad W/m2/day History 24 h","server":"6a3c3921969e85fe","version":1,"startDate":"","endDate":"","entityId":"sensor.gw2000a_solar_radiation","entityIdType":"equals","useRelativeTime":true,"relativeTime":"24 h","flatten":true,"outputType":"array","outputLocationType":"msg","outputLocation":"payload","x":400,"y":220,"wires":[["41f32c90b3b3802a"]]},{"id":"31c08c4bf56ed98d","type":"function","z":"d0a0029743190dc0","name":"Calculate Mean","func":"// Get the array of numbers from input\nlet numbers = msg.payload;\n\nif (!Array.isArray(numbers)) {\n node.error(\"Input must be an array of numbers\");\n return null;\n}\n\n// Calculate mean\nlet sum = numbers.reduce((a, b) => a + b, 0);\nlet mean = sum / numbers.length;\n\n// Create output message\n// msg.payload = {\n// original: numbers,\n// mean: mean,\n// count: numbers.length\n// };\n\nmsg.payload = mean\n\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":1040,"y":220,"wires":[["c8335795bd759de7"]]},{"id":"ea6ff13749abb47a","type":"api-get-history","z":"d0a0029743190dc0","name":"Wind Speed m/s History 24 h","server":"6a3c3921969e85fe","version":1,"startDate":"","endDate":"","entityId":"sensor.gw2000a_wind_speed","entityIdType":"equals","useRelativeTime":true,"relativeTime":"24 h","flatten":true,"outputType":"array","outputLocationType":"msg","outputLocation":"payload","x":380,"y":320,"wires":[["c71da442b2c55e26"]]},{"id":"b6a168437f603ee7","type":"function","z":"d0a0029743190dc0","name":"Calculate Mean","func":"// Get the array of numbers from input\nlet numbers = msg.payload;\n\nif (!Array.isArray(numbers)) {\n node.error(\"Input must be an array of numbers\");\n return null;\n}\n\n// Calculate mean\nlet sum = numbers.reduce((a, b) => a + b, 0);\nlet mean = sum / numbers.length;\n\n// Create output message\n// msg.payload = {\n// original: numbers,\n// mean: mean,\n// count: numbers.length\n// };\n\nmsg.payload = mean\n\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":1040,"y":320,"wires":[["dd4574a6e57ecf15"]]},{"id":"6cd2bb86498ad0ec","type":"api-get-history","z":"d0a0029743190dc0","name":"Humidity % History 24 h","server":"6a3c3921969e85fe","version":1,"startDate":"","endDate":"","entityId":"sensor.gw2000a_humidity","entityIdType":"equals","useRelativeTime":true,"relativeTime":"24 h","flatten":true,"outputType":"array","outputLocationType":"msg","outputLocation":"payload","x":370,"y":420,"wires":[["ed0aa6d540b1b931"]]},{"id":"6494b8f4bc39874c","type":"function","z":"d0a0029743190dc0","name":"Calculate Mean","func":"// Get the array of numbers from input\nlet numbers = msg.payload;\n\nif (!Array.isArray(numbers)) {\n node.error(\"Input must be an array of numbers\");\n return null;\n}\n\n// Calculate mean\nlet sum = numbers.reduce((a, b) => a + b, 0);\nlet mean = sum / numbers.length;\n\n// Create output message\n// msg.payload = {\n// original: numbers,\n// mean: mean,\n// count: numbers.length\n// };\n\nmsg.payload = mean\n\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":1040,"y":420,"wires":[["2904a2fa1063f7b7"]]},{"id":"d0ffbfe6b4693a1e","type":"function","z":"d0a0029743190dc0","name":"Global Set","func":"global.set(\"temperature\", msg.payload);\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1290,"y":120,"wires":[["865de541331eb0aa","2145d0212b9e314c"]]},{"id":"c8335795bd759de7","type":"function","z":"d0a0029743190dc0","name":"Global Set","func":"global.set(\"solarRadiation\", msg.payload);\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1290,"y":220,"wires":[["19036dcf83b46a54","a1047b97b3798b3b"]]},{"id":"2904a2fa1063f7b7","type":"function","z":"d0a0029743190dc0","name":"Global Set","func":"global.set(\"relativeHumidity\", msg.payload);\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1290,"y":420,"wires":[["fe0df550dde56d51","e42ef451a23edc41"]]},{"id":"dd4574a6e57ecf15","type":"function","z":"d0a0029743190dc0","name":"Global Set","func":"global.set(\"windSpeed\", msg.payload);\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1290,"y":320,"wires":[["d6bbf3c8908e71df","2881dc60fa8bd2f2"]]},{"id":"7e2e3f234f0a0dd7","type":"split","z":"d0a0029743190dc0","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","property":"payload","x":1390,"y":580,"wires":[["17dd4f94a57fd640"]]},{"id":"17dd4f94a57fd640","type":"debug","z":"d0a0029743190dc0","name":"debug 1","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1700,"y":580,"wires":[]},{"id":"b880048a7a4525f4","type":"function","z":"d0a0029743190dc0","name":"Extract Numbers","func":"if (Array.isArray(msg.payload)) {\n // Handle different history formats\n try {\n // If array contains objects with 'state' property\n if (msg.payload[0].state !== undefined) {\n msg.payload = msg.payload.map(item => {\n // Convert string numbers to actual numbers\n return Number(item.state);\n });\n }\n // If array already contains numbers or number strings\n else if (typeof msg.payload[0] === 'number' || !isNaN(msg.payload[0])) {\n msg.payload = msg.payload.map(Number);\n }\n else {\n node.error('Unsupported array format');\n return null;\n }\n \n // Filter out any NaN values\n msg.payload = msg.payload.filter(num => !isNaN(num));\n \n return msg;\n } catch (error) {\n node.error('Error processing array: ' + error.message);\n return null;\n }\n} else {\n node.error('Input must be an array');\n return null;\n}","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":730,"y":120,"wires":[["f631997554862ae3"]]},{"id":"41f32c90b3b3802a","type":"function","z":"d0a0029743190dc0","name":"Extract Numbers","func":"if (Array.isArray(msg.payload)) {\n // Handle different history formats\n try {\n // If array contains objects with 'state' property\n if (msg.payload[0].state !== undefined) {\n msg.payload = msg.payload.map(item => {\n // Convert string numbers to actual numbers\n return Number(item.state);\n });\n }\n // If array already contains numbers or number strings\n else if (typeof msg.payload[0] === 'number' || !isNaN(msg.payload[0])) {\n msg.payload = msg.payload.map(Number);\n }\n else {\n node.error('Unsupported array format');\n return null;\n }\n \n // Filter out any NaN values\n msg.payload = msg.payload.filter(num => !isNaN(num));\n \n return msg;\n } catch (error) {\n node.error('Error processing array: ' + error.message);\n return null;\n }\n} else {\n node.error('Input must be an array');\n return null;\n}","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":730,"y":220,"wires":[["31c08c4bf56ed98d"]]},{"id":"c71da442b2c55e26","type":"function","z":"d0a0029743190dc0","name":"Extract Numbers","func":"if (Array.isArray(msg.payload)) {\n // Handle different history formats\n try {\n // If array contains objects with 'state' property\n if (msg.payload[0].state !== undefined) {\n msg.payload = msg.payload.map(item => {\n // Convert string numbers to actual numbers\n return Number(item.state);\n });\n }\n // If array already contains numbers or number strings\n else if (typeof msg.payload[0] === 'number' || !isNaN(msg.payload[0])) {\n msg.payload = msg.payload.map(Number);\n }\n else {\n node.error('Unsupported array format');\n return null;\n }\n \n // Filter out any NaN values\n msg.payload = msg.payload.filter(num => !isNaN(num));\n \n return msg;\n } catch (error) {\n node.error('Error processing array: ' + error.message);\n return null;\n }\n} else {\n node.error('Input must be an array');\n return null;\n}","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":730,"y":320,"wires":[["b6a168437f603ee7"]]},{"id":"ed0aa6d540b1b931","type":"function","z":"d0a0029743190dc0","name":"Extract Numbers","func":"if (Array.isArray(msg.payload)) {\n // Handle different history formats\n try {\n // If array contains objects with 'state' property\n if (msg.payload[0].state !== undefined) {\n msg.payload = msg.payload.map(item => {\n // Convert string numbers to actual numbers\n return Number(item.state);\n });\n }\n // If array already contains numbers or number strings\n else if (typeof msg.payload[0] === 'number' || !isNaN(msg.payload[0])) {\n msg.payload = msg.payload.map(Number);\n }\n else {\n node.error('Unsupported array format');\n return null;\n }\n \n // Filter out any NaN values\n msg.payload = msg.payload.filter(num => !isNaN(num));\n \n return msg;\n } catch (error) {\n node.error('Error processing array: ' + error.message);\n return null;\n }\n} else {\n node.error('Input must be an array');\n return null;\n}","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":730,"y":420,"wires":[["6494b8f4bc39874c"]]},{"id":"865de541331eb0aa","type":"link out","z":"d0a0029743190dc0","name":"link out 5","mode":"link","links":["d70af9b223acc85b"],"x":1445,"y":80,"wires":[]},{"id":"19036dcf83b46a54","type":"link out","z":"d0a0029743190dc0","name":"link out 6","mode":"link","links":["d70af9b223acc85b"],"x":1445,"y":180,"wires":[]},{"id":"d6bbf3c8908e71df","type":"link out","z":"d0a0029743190dc0","name":"link out 7","mode":"link","links":["d70af9b223acc85b"],"x":1445,"y":280,"wires":[]},{"id":"fe0df550dde56d51","type":"link out","z":"d0a0029743190dc0","name":"link out 8","mode":"link","links":["d70af9b223acc85b"],"x":1445,"y":380,"wires":[]},{"id":"d70af9b223acc85b","type":"link in","z":"d0a0029743190dc0","name":"link in 45","links":["19036dcf83b46a54","865de541331eb0aa","d6bbf3c8908e71df","fe0df550dde56d51"],"x":275,"y":520,"wires":[["dde1f6803602fab5"]]},{"id":"745a0be9a8e59aa1","type":"api-get-history","z":"d0a0029743190dc0","name":"Daily rain rate","server":"6a3c3921969e85fe","version":1,"startDate":"","endDate":"","entityId":"sensor.gw2000a_daily_rain_rate_piezo","entityIdType":"equals","useRelativeTime":true,"relativeTime":"24 h","flatten":true,"outputType":"split","outputLocationType":"msg","outputLocation":"payload","x":480,"y":640,"wires":[["55261693529b5b37"]]},{"id":"55261693529b5b37","type":"function","z":"d0a0029743190dc0","name":"parseFloat","func":"msg.payload = parseFloat(msg.payload.state);\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":730,"y":640,"wires":[["5d7c59e18a6e9488"]]},{"id":"5d7c59e18a6e9488","type":"function","z":"d0a0029743190dc0","name":"Daily Rain Rate","func":"global.set(\"dailyRain\", msg.payload);\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1300,"y":640,"wires":[[]]},{"id":"3a020d9760bd6e7a","type":"link in","z":"d0a0029743190dc0","name":"link in 47","links":["f5697da887a54c75"],"x":785,"y":740,"wires":[["18dd151e0cee26d0"]]},{"id":"18dd151e0cee26d0","type":"function","z":"d0a0029743190dc0","name":"Global Set","func":"global.set(\"et0\", msg.payload.ET);\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1290,"y":740,"wires":[[]]},{"id":"f5697da887a54c75","type":"link out","z":"d0a0029743190dc0","name":"link out 9","mode":"link","links":["3a020d9760bd6e7a","a0d299a7e9bf6792","6133e489ccb75478"],"x":1245,"y":480,"wires":[]},{"id":"1e9701a9f00475cf","type":"link out","z":"d0a0029743190dc0","name":"link out 10","mode":"link","links":["ddcdd6ab4a46516e","24726a812d11bfd7","badd12634fe37357","a1e165bfe3c8a6c7","0bb14c4f7aef5599","28326775a79aec49"],"x":265,"y":40,"wires":[]},{"id":"ddcdd6ab4a46516e","type":"link in","z":"d0a0029743190dc0","name":"link in 49","links":["1e9701a9f00475cf"],"x":165,"y":120,"wires":[["f58041629c8aa183"]]},{"id":"24726a812d11bfd7","type":"link in","z":"d0a0029743190dc0","name":"link in 50","links":["1e9701a9f00475cf"],"x":165,"y":220,"wires":[["3594d0dc7f8541bd"]]},{"id":"badd12634fe37357","type":"link in","z":"d0a0029743190dc0","name":"link in 51","links":["1e9701a9f00475cf"],"x":165,"y":320,"wires":[["ea6ff13749abb47a"]]},{"id":"a1e165bfe3c8a6c7","type":"link in","z":"d0a0029743190dc0","name":"link in 52","links":["1e9701a9f00475cf"],"x":165,"y":420,"wires":[["6cd2bb86498ad0ec"]]},{"id":"0bb14c4f7aef5599","type":"link in","z":"d0a0029743190dc0","name":"link in 53","links":["1e9701a9f00475cf"],"x":165,"y":640,"wires":[["745a0be9a8e59aa1"]]},{"id":"2145d0212b9e314c","type":"ui_text","z":"d0a0029743190dc0","group":"43e793fcea03b5bf","order":0,"width":0,"height":0,"name":"","label":"Temperature Mean: ","format":"{{msg.payload}}","layout":"row-spread","className":"","style":false,"font":"","fontSize":16,"color":"#000000","x":1550,"y":140,"wires":[]},{"id":"a1047b97b3798b3b","type":"ui_text","z":"d0a0029743190dc0","group":"43e793fcea03b5bf","order":1,"width":0,"height":0,"name":"","label":"Solar Radiation Mean: ","format":"{{msg.payload}}","layout":"row-spread","className":"","style":false,"font":"","fontSize":16,"color":"#000000","x":1560,"y":240,"wires":[]},{"id":"2881dc60fa8bd2f2","type":"ui_text","z":"d0a0029743190dc0","group":"43e793fcea03b5bf","order":2,"width":0,"height":0,"name":"","label":"Wind Speed Mean: ","format":"{{msg.payload}}","layout":"row-spread","className":"","style":false,"font":"","fontSize":16,"color":"#000000","x":1550,"y":340,"wires":[]},{"id":"e42ef451a23edc41","type":"ui_text","z":"d0a0029743190dc0","group":"43e793fcea03b5bf","order":3,"width":0,"height":0,"name":"","label":"Humidity Mean: ","format":"{{msg.payload}}","layout":"row-spread","className":"","style":false,"font":"","fontSize":16,"color":"#000000","x":1540,"y":440,"wires":[]},{"id":"5d2d70ed68b02343","type":"api-get-history","z":"d0a0029743190dc0","name":"Weekly rain rate","server":"6a3c3921969e85fe","version":1,"startDate":"","endDate":"","entityId":"sensor.gw2000a_weekly_rain_rate_piezo","entityIdType":"equals","useRelativeTime":true,"relativeTime":"24 h","flatten":true,"outputType":"split","outputLocationType":"msg","outputLocation":"payload","x":480,"y":700,"wires":[["4e37f76edc9b53d8"]]},{"id":"4e37f76edc9b53d8","type":"function","z":"d0a0029743190dc0","name":"parseFloat","func":"msg.payload = parseFloat(msg.payload.state);\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":730,"y":700,"wires":[["864a0523af67e901"]]},{"id":"864a0523af67e901","type":"function","z":"d0a0029743190dc0","name":"Wekly Rain Rate","func":"global.set(\"weeklyRain\", msg.payload);\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1310,"y":700,"wires":[[]]},{"id":"28326775a79aec49","type":"link in","z":"d0a0029743190dc0","name":"link in 55","links":["1e9701a9f00475cf"],"x":165,"y":700,"wires":[["5d2d70ed68b02343"]]},{"id":"6a3c3921969e85fe","type":"server","name":"Home Assistant","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":"30","areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":": ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"default","statusTimeFormat":"h:m","enableGlobalContextStore":false},{"id":"43e793fcea03b5bf","type":"ui_group","name":"Default","tab":"c3514d7e422c425a","order":1,"disp":true,"width":"6","collapse":false,"className":""},{"id":"c3514d7e422c425a","type":"ui_tab","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]