How to test watts on panels, if watts higher than 500 then

Greetings,
i have a solar system that i can talk to via MQTT and MODBUS. I would like to turn on "load" when there is enough (500 watts) solar energy. The issue is that i have to I have to turn the inverter on in order to see how many watts the panels are taking in.
I would like to start the test at 11am and continue to test in case a cloud blocks the sun for x amount of time.
On the function, if watts equal or greater than 500watts, turn on inverter and continue to use inverter but sometimes when a cloud arrives and goes away the wattage drops and the function will turn off the inverter. Is it possible to delay the messages, like i've attempted, to keep the inverter on?

I would like the function to have a buffer(?) so that if watts drop for lets say 5min it wont turn off the inverter?

thank you

[{"id":"ac233275.b5b028","type":"tab","label":"Flow 5","disabled":false,"info":""},{"id":"f16dd439.77b528","type":"function","z":"ac233275.b5b028","name":"PV Watts Test","func":"var pvwatts = msg.payload.value;\n\nif (pvwatts >= 500) {\n    msg.payload = 2;\n    } \nelse { \n    msg.payload = 3;\n    \n}\n    return msg;\n","outputs":1,"noerr":0,"x":460,"y":200,"wires":[["f92831c8.c202d"]]},{"id":"878b994.287f1e8","type":"modbus-write","z":"ac233275.b5b028","name":"Turn Inverter On/OFF","showStatusActivities":false,"showErrors":false,"unitid":"237","dataType":"HoldingRegister","adr":"33","quantity":"1","server":"b6c5d7eb.2e0208","x":840,"y":200,"wires":[[],[]]},{"id":"f92831c8.c202d","type":"delay","z":"ac233275.b5b028","name":"","pauseType":"delay","timeout":"30","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":640,"y":200,"wires":[["878b994.287f1e8"]]},{"id":"c492ea91.f2b34","type":"delay","z":"ac233275.b5b028","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":300,"y":200,"wires":[["f16dd439.77b528"]]},{"id":"a08a5643.9e2578","type":"timerswitch","z":"ac233275.b5b028","name":"Start  PV Test","ontopic":"2","offtopic":"3","onpayload":"2","offpayload":"3","disabled":false,"schedules":[{"on_h":"09","on_m":"30","on_s":"00","off_h":"09","off_m":"31","off_s":"00","valid":true},{"on_h":"10","on_m":"00","on_s":"00","off_h":"10","off_m":"01","off_s":"00","valid":true},{"on_h":"10","on_m":"30","on_s":"00","off_h":"10","off_m":"31","off_s":"00","valid":true},{"on_h":"11","on_m":"00","on_s":"00","off_h":"11","off_m":"01","off_s":"00","valid":true},{"on_h":"11","on_m":"30","on_s":"00","off_h":"11","off_m":"31","off_s":"00","valid":true},{"on_h":"12","on_m":"00","on_s":"00","off_h":"12","off_m":"01","off_s":"00","valid":true}],"x":310,"y":340,"wires":[[]]},{"id":"68d25002.28077","type":"modbus-write","z":"ac233275.b5b028","name":"Turn Inverter On/OFF","showStatusActivities":false,"showErrors":false,"unitid":"237","dataType":"HoldingRegister","adr":"33","quantity":"1","server":"b6c5d7eb.2e0208","x":560,"y":400,"wires":[[],[]]},{"id":"68e2908b.4b9c4","type":"comment","z":"ac233275.b5b028","name":"Test PV watts starting at 09:30am","info":"","x":430,"y":280,"wires":[]},{"id":"66a83b.4d6627c4","type":"light-scheduler","z":"ac233275.b5b028","settings":"8d54dfea.730608","events":"[{\"start\":{\"dow\":1,\"mod\":720},\"end\":{\"dow\":1,\"mod\":735}},{\"start\":{\"dow\":1,\"mod\":735},\"end\":{\"dow\":1,\"mod\":750}},{\"start\":{\"dow\":1,\"mod\":750},\"end\":{\"dow\":1,\"mod\":765}},{\"start\":{\"dow\":1,\"mod\":765},\"end\":{\"dow\":1,\"mod\":780}},{\"start\":{\"dow\":1,\"mod\":780},\"end\":{\"dow\":1,\"mod\":795}},{\"start\":{\"dow\":1,\"mod\":795},\"end\":{\"dow\":1,\"mod\":810}},{\"start\":{\"dow\":1,\"mod\":810},\"end\":{\"dow\":1,\"mod\":825}},{\"start\":{\"dow\":1,\"mod\":825},\"end\":{\"dow\":1,\"mod\":840}},{\"start\":{\"dow\":1,\"mod\":840},\"end\":{\"dow\":1,\"mod\":855}},{\"start\":{\"dow\":1,\"mod\":855},\"end\":{\"dow\":1,\"mod\":870}},{\"start\":{\"dow\":1,\"mod\":870},\"end\":{\"dow\":1,\"mod\":885}},{\"start\":{\"dow\":1,\"mod\":885},\"end\":{\"dow\":1,\"mod\":900}},{\"start\":{\"dow\":1,\"mod\":900},\"end\":{\"dow\":1,\"mod\":915}},{\"start\":{\"dow\":1,\"mod\":705},\"end\":{\"dow\":1,\"mod\":720}},{\"start\":{\"dow\":2,\"mod\":705},\"end\":{\"dow\":2,\"mod\":720}},{\"start\":{\"dow\":3,\"mod\":705},\"end\":{\"dow\":3,\"mod\":720}},{\"start\":{\"dow\":4,\"mod\":705},\"end\":{\"dow\":4,\"mod\":720}},{\"start\":{\"dow\":5,\"mod\":705},\"end\":{\"dow\":5,\"mod\":720}},{\"start\":{\"dow\":6,\"mod\":705},\"end\":{\"dow\":6,\"mod\":720}},{\"start\":{\"dow\":0,\"mod\":705},\"end\":{\"dow\":0,\"mod\":720}},{\"start\":{\"dow\":0,\"mod\":720},\"end\":{\"dow\":0,\"mod\":735}},{\"start\":{\"dow\":6,\"mod\":735},\"end\":{\"dow\":6,\"mod\":750}},{\"start\":{\"dow\":5,\"mod\":720},\"end\":{\"dow\":5,\"mod\":735}},{\"start\":{\"dow\":6,\"mod\":720},\"end\":{\"dow\":6,\"mod\":735}},{\"start\":{\"dow\":0,\"mod\":750},\"end\":{\"dow\":0,\"mod\":765}},{\"start\":{\"dow\":0,\"mod\":735},\"end\":{\"dow\":0,\"mod\":750}},{\"start\":{\"dow\":5,\"mod\":750},\"end\":{\"dow\":5,\"mod\":765}},{\"start\":{\"dow\":5,\"mod\":735},\"end\":{\"dow\":5,\"mod\":750}},{\"start\":{\"dow\":6,\"mod\":765},\"end\":{\"dow\":6,\"mod\":780}},{\"start\":{\"dow\":6,\"mod\":750},\"end\":{\"dow\":6,\"mod\":765}},{\"start\":{\"dow\":0,\"mod\":765},\"end\":{\"dow\":0,\"mod\":780}},{\"start\":{\"dow\":0,\"mod\":780},\"end\":{\"dow\":0,\"mod\":795}},{\"start\":{\"dow\":0,\"mod\":795},\"end\":{\"dow\":0,\"mod\":810}},{\"start\":{\"dow\":0,\"mod\":825},\"end\":{\"dow\":0,\"mod\":840}},{\"start\":{\"dow\":0,\"mod\":810},\"end\":{\"dow\":0,\"mod\":825}},{\"start\":{\"dow\":0,\"mod\":855},\"end\":{\"dow\":0,\"mod\":870}},{\"start\":{\"dow\":0,\"mod\":840},\"end\":{\"dow\":0,\"mod\":855}},{\"start\":{\"dow\":0,\"mod\":900},\"end\":{\"dow\":0,\"mod\":915}},{\"start\":{\"dow\":0,\"mod\":870},\"end\":{\"dow\":0,\"mod\":885}},{\"start\":{\"dow\":0,\"mod\":885},\"end\":{\"dow\":0,\"mod\":900}},{\"start\":{\"dow\":6,\"mod\":900},\"end\":{\"dow\":6,\"mod\":915}},{\"start\":{\"dow\":6,\"mod\":885},\"end\":{\"dow\":6,\"mod\":900}},{\"start\":{\"dow\":6,\"mod\":870},\"end\":{\"dow\":6,\"mod\":885}},{\"start\":{\"dow\":6,\"mod\":840},\"end\":{\"dow\":6,\"mod\":855}},{\"start\":{\"dow\":6,\"mod\":855},\"end\":{\"dow\":6,\"mod\":870}},{\"start\":{\"dow\":6,\"mod\":825},\"end\":{\"dow\":6,\"mod\":840}},{\"start\":{\"dow\":6,\"mod\":810},\"end\":{\"dow\":6,\"mod\":825}},{\"start\":{\"dow\":6,\"mod\":795},\"end\":{\"dow\":6,\"mod\":810}},{\"start\":{\"dow\":6,\"mod\":780},\"end\":{\"dow\":6,\"mod\":795}},{\"start\":{\"dow\":5,\"mod\":765},\"end\":{\"dow\":5,\"mod\":780}},{\"start\":{\"dow\":5,\"mod\":780},\"end\":{\"dow\":5,\"mod\":795}},{\"start\":{\"dow\":5,\"mod\":795},\"end\":{\"dow\":5,\"mod\":810}},{\"start\":{\"dow\":5,\"mod\":810},\"end\":{\"dow\":5,\"mod\":825}},{\"start\":{\"dow\":5,\"mod\":825},\"end\":{\"dow\":5,\"mod\":840}},{\"start\":{\"dow\":5,\"mod\":840},\"end\":{\"dow\":5,\"mod\":855}},{\"start\":{\"dow\":5,\"mod\":855},\"end\":{\"dow\":5,\"mod\":870}},{\"start\":{\"dow\":5,\"mod\":870},\"end\":{\"dow\":5,\"mod\":885}},{\"start\":{\"dow\":5,\"mod\":885},\"end\":{\"dow\":5,\"mod\":900}},{\"start\":{\"dow\":5,\"mod\":900},\"end\":{\"dow\":5,\"mod\":915}},{\"start\":{\"dow\":4,\"mod\":885},\"end\":{\"dow\":4,\"mod\":900}},{\"start\":{\"dow\":4,\"mod\":900},\"end\":{\"dow\":4,\"mod\":915}},{\"start\":{\"dow\":3,\"mod\":900},\"end\":{\"dow\":3,\"mod\":915}},{\"start\":{\"dow\":2,\"mod\":900},\"end\":{\"dow\":2,\"mod\":915}},{\"start\":{\"dow\":2,\"mod\":885},\"end\":{\"dow\":2,\"mod\":900}},{\"start\":{\"dow\":3,\"mod\":885},\"end\":{\"dow\":3,\"mod\":900}},{\"start\":{\"dow\":4,\"mod\":870},\"end\":{\"dow\":4,\"mod\":885}},{\"start\":{\"dow\":4,\"mod\":840},\"end\":{\"dow\":4,\"mod\":855}},{\"start\":{\"dow\":4,\"mod\":825},\"end\":{\"dow\":4,\"mod\":840}},{\"start\":{\"dow\":4,\"mod\":855},\"end\":{\"dow\":4,\"mod\":870}},{\"start\":{\"dow\":4,\"mod\":810},\"end\":{\"dow\":4,\"mod\":825}},{\"start\":{\"dow\":4,\"mod\":780},\"end\":{\"dow\":4,\"mod\":795}},{\"start\":{\"dow\":4,\"mod\":795},\"end\":{\"dow\":4,\"mod\":810}},{\"start\":{\"dow\":4,\"mod\":765},\"end\":{\"dow\":4,\"mod\":780}},{\"start\":{\"dow\":4,\"mod\":750},\"end\":{\"dow\":4,\"mod\":765}},{\"start\":{\"dow\":4,\"mod\":735},\"end\":{\"dow\":4,\"mod\":750}},{\"start\":{\"dow\":4,\"mod\":720},\"end\":{\"dow\":4,\"mod\":735}},{\"start\":{\"dow\":3,\"mod\":720},\"end\":{\"dow\":3,\"mod\":735}},{\"start\":{\"dow\":3,\"mod\":735},\"end\":{\"dow\":3,\"mod\":750}},{\"start\":{\"dow\":3,\"mod\":750},\"end\":{\"dow\":3,\"mod\":765}},{\"start\":{\"dow\":3,\"mod\":765},\"end\":{\"dow\":3,\"mod\":780}},{\"start\":{\"dow\":3,\"mod\":780},\"end\":{\"dow\":3,\"mod\":795}},{\"start\":{\"dow\":3,\"mod\":795},\"end\":{\"dow\":3,\"mod\":810}},{\"start\":{\"dow\":3,\"mod\":825},\"end\":{\"dow\":3,\"mod\":840}},{\"start\":{\"dow\":3,\"mod\":810},\"end\":{\"dow\":3,\"mod\":825}},{\"start\":{\"dow\":3,\"mod\":840},\"end\":{\"dow\":3,\"mod\":855}},{\"start\":{\"dow\":3,\"mod\":870},\"end\":{\"dow\":3,\"mod\":885}},{\"start\":{\"dow\":3,\"mod\":855},\"end\":{\"dow\":3,\"mod\":870}},{\"start\":{\"dow\":2,\"mod\":855},\"end\":{\"dow\":2,\"mod\":870}},{\"start\":{\"dow\":2,\"mod\":870},\"end\":{\"dow\":2,\"mod\":885}},{\"start\":{\"dow\":2,\"mod\":825},\"end\":{\"dow\":2,\"mod\":840}},{\"start\":{\"dow\":2,\"mod\":840},\"end\":{\"dow\":2,\"mod\":855}},{\"start\":{\"dow\":2,\"mod\":795},\"end\":{\"dow\":2,\"mod\":810}},{\"start\":{\"dow\":2,\"mod\":780},\"end\":{\"dow\":2,\"mod\":795}},{\"start\":{\"dow\":2,\"mod\":765},\"end\":{\"dow\":2,\"mod\":780}},{\"start\":{\"dow\":2,\"mod\":750},\"end\":{\"dow\":2,\"mod\":765}},{\"start\":{\"dow\":2,\"mod\":735},\"end\":{\"dow\":2,\"mod\":750}},{\"start\":{\"dow\":2,\"mod\":720},\"end\":{\"dow\":2,\"mod\":735}},{\"start\":{\"dow\":2,\"mod\":810},\"end\":{\"dow\":2,\"mod\":825}}]","topic":"","name":"","onPayload":"2","onPayloadType":"str","offPayload":"","offPayloadType":"str","onlyWhenDark":false,"scheduleRndMax":0,"sunElevationThreshold":6,"sunShowElevationInStatus":true,"outputfreq":"output.statechange.startup","x":300,"y":400,"wires":[["68d25002.28077"]]},{"id":"5237deb2.24b388","type":"comment","z":"ac233275.b5b028","name":"Turn on inverter if higher than 500","info":"","x":540,"y":160,"wires":[]},{"id":"164ad369.0e6ec5","type":"inject","z":"ac233275.b5b028","name":"watts","topic":"","payload":"500","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":130,"y":200,"wires":[["c492ea91.f2b34"]]},{"id":"b6c5d7eb.2e0208","type":"modbus-client","z":"","name":"VictronVenus","clienttype":"tcp","bufferCommands":true,"stateLogEnabled":false,"tcpHost":"192.168.3.30","tcpPort":"502","tcpType":"DEFAULT","serialPort":"/dev/ttyUSB","serialType":"RTU-BUFFERD","serialBaudrate":"9600","serialDatabits":"8","serialStopbits":"1","serialParity":"none","serialConnectionDelay":"100","unit_id":"1","commandDelay":"1","clientTimeout":"1000","reconnectTimeout":"2000"},{"id":"8d54dfea.730608","type":"light-scheduler-settings","z":"","name":"my settings","latitude":"43.6437933","longitude":"-116.29615919999999"}]

Consider using the delay node in mode "rate limit" (instead of delay each message) in which case yu would configure the rate of 1 msg each 5 minutes , dropping intermediate messages.

Thanks Andrei. I didn't about that approach, still very much a noob on Node Red.