For these kinds of data you really should look into SMNP instead.
Get the iReasoning MIB Browser and see the data available on the switch, then use NodeRed’s or HA’s SMNP plugins to read out that data.
Just remember that the number for data flow is a rolling 32bit integer for bytes, so whenever it reach its max at 4.294.967.296, then it will start from 0.
This also means you need to extract your values atleast once per ((4.294.967.296*8)/1.000.000.0000=) 34 seconds or you will not know for sure if you had 2 rollovers with full speed or just 1 rollover with a really low speed.
Here are my SMNP flow for NodeRed. It have a few switches of different brands too, but just delete the nodes for the hosts to get rid of them.
My EdgeRouter is an EdgeRouter 4.
[{"id":"d81764c14a65b21a","type":"inject","z":"742cc87db4d12986","name":"","props":[{"p":"timestamp","v":"","vt":"date"}],"repeat":"10","crontab":"","once":true,"onceDelay":"60","topic":"","x":100,"y":585,"wires":[["df6196fbcdc8a9b6","f8e32a5923560d99","861e29b536dc3aad","adad593d0138f83d","2bd20ce8f3574b39","dd31072fb613809b"]]},{"id":"dd9c0114a58cf2c9","type":"ha-api","z":"742cc87db4d12986","name":"sensor","server":"541ade28.b4a62","version":1,"debugenabled":false,"protocol":"http","method":"post","path":"/api/states/{{entity_id}}","data":"","dataType":"json","responseType":"json","outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"results"}],"x":515,"y":765,"wires":[[]]},{"id":"deb440573b10d7a2","type":"snmp","z":"742cc87db4d12986","host":"","version":"2c","timeout":5,"community":"public","auth":"noAuthNoPriv","authprot":"MD5","privprot":"DES","oids":"1.3.6.1.2.1.1.5.0,\n1.3.6.1.2.1.1.6.0,\n1.3.6.1.2.1.1.3.0","name":"basic","x":515,"y":585,"wires":[["bfd8ad8abe116d82"]]},{"id":"97dca3846ee3bd95","type":"function","z":"742cc87db4d12986","name":"make final payload","func":"msg.oidrx=msg.payload;\n\n// The RX and TX values are int32 values and are measuring in bits/s.\n// This means the overflow can happen in just over 17 seconds on some interfaces, if operating at full capacity.\n// The update frequence should therefore not be set higher than 15 seconds to avoid a double overflow in the the timeframe\n\n// Get stored list previous flowstats or initialize it, if it does not exist.\nvar flowstats = flow.get(\"flowstats_\"+msg.oiddevice);\nvar tempvalue;\nvar i;\nif (!flowstats){\n flowstats = {\n 'timestamp':Math.floor(msg.timestamp/1000)-10 // calculate to seconds\n }\n for (i = 1; i <= msg.oidrx.length; i++)\n {\n flowstats['if'+i+'_rx']=Math.floor(msg.oidrx[i-1].value/10); // just to give some middle value between 0 and the current start value. Value is bytes/s\n flowstats['if'+i+'_rx']=Math.floor(msg.oidrx[i-1].value/10); // just to give some middle value between 0 and the current start value Value is bytes/s\n }\n}\n\n// Initialize an attribs set for the HA sensor\nvar attribs = {\n 'friendly_name': 'SNMP '+msg.oiddevice,\n 'icon': 'mdi:router-network',\n 'name':msg.oiddevice,\n 'location':msg.oidlocation,\n 'uptime':Math.floor(msg.oiduptime/100) // calculate to seconds\n}\n\nfor (i = 1; i <= msg.oidname.length; i++)\n{\n attribs['if'+i+'_name']=msg.oidcustomname[i-1].value.toString();\n if (attribs['if'+i+'_name']==\"\")\n {\n attribs['if'+i+'_name']=msg.oidname[i-1].value.toString();\n }\n}\n\nfor (i = 1; i <= msg.oidenabled.length; i++)\n{\n attribs['if'+i+'_enabled']=(msg.oidenabled[i-1].value-2)*-1; // 0=disabled, 1=enabled, other=unknown\n}\n\nfor (i = 1; i <= msg.oidlink.length; i++)\n{\n attribs['if'+i+'_link']=(msg.oidlink[i-1].value-2)*-1; // 0=disabled, 1=enabled, other=unknown\n}\n\nfor (i = 1; i <= msg.oidspeed.length; i++)\n{\n attribs['if'+i+'_speed']=msg.oidspeed[i-1].value; // Value is bits/s\n}\n\nfor (i = 1; i <= msg.oidrx.length; i++)\n{\n if (msg.oidspeed[i-1].value==0)\n {\n attribs['if'+i+'_rx']=0; // Value in bits/s\n attribs['if'+i+'_rx_percent']=0; \n }\n else\n {\n tempvalue=msg.oidrx[i-1].value;\n if (tempvalue<flowstats['if'+i+'_rx'])\n {\n tempvalue=tempvalue+4294967296;\n }\n attribs['if'+i+'_rx']=Math.floor(((tempvalue-flowstats['if'+i+'_rx'])*8)/(Math.floor(msg.timestamp/1000)-flowstats['timestamp'])); // Value in bits/s\n attribs['if'+i+'_rx_percent']=Math.floor((attribs['if'+i+'_rx']/attribs['if'+i+'_speed'])*100);\n }\n flowstats['if'+i+'_rx']=msg.oidrx[i-1].value // Value in bits/s\n}\n\nfor (i = 1; i <= msg.oidtx.length; i++)\n{\n if (msg.oidspeed[i-1].value==0)\n {\n attribs['if'+i+'_tx']=0; // Value in bits/s\n attribs['if'+i+'_tx_percent']=0; \n }\n else\n {\n tempvalue=msg.oidtx[i-1].value;\n if (tempvalue<flowstats['if'+i+'_tx'])\n {\n tempvalue=tempvalue+4294967296;\n }\n attribs['if'+i+'_tx']=Math.floor(((tempvalue-flowstats['if'+i+'_tx'])*8)/(Math.floor(msg.timestamp/1000)-flowstats['timestamp'])); // Value in bits/s\n attribs['if'+i+'_tx_percent']=Math.floor((attribs['if'+i+'_tx']/attribs['if'+i+'_speed'])*100);\n }\n flowstats['if'+i+'_tx']=msg.oidtx[i-1].value // Value in bits/s\n}\n\n\nmsg.attribs = attribs;\nmsg.entity_id = `sensor.snmp_`+msg.oiddevice;\nmsg.payload = {\n data: {\n state: Date.now(),\n attributes: attribs\n }\n};\n\nflowstats['timestamp']=Math.floor(msg.timestamp/1000); // calculate to seconds\nflow.set(\"flowstats_\"+msg.oiddevice, flowstats);\n\ndelete msg.oid;\ndelete msg.attribs;\ndelete msg.oiddevice;\ndelete msg.oidlocation;\ndelete msg.oiduptime;\ndelete msg.oidcustomname;\ndelete msg.oidname;\ndelete msg.oidenabled;\ndelete msg.oidlink;\ndelete msg.oidspeed;\ndelete msg.oidrx;\ndelete msg.oidtx;\n\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":990,"y":720,"wires":[["dd9c0114a58cf2c9"]]},{"id":"1afa5a5f1b2ced5c","type":"snmp subtree","z":"742cc87db4d12986","host":"","version":"2c","timeout":5,"community":"public","auth":"noAuthNoPriv","authprot":"MD5","privprot":"DES","oids":"1.3.6.1.2.1.2.2.1.2","name":"name","x":515,"y":630,"wires":[["c04edffcedde3131"]]},{"id":"c04edffcedde3131","type":"function","z":"742cc87db4d12986","name":"rearrange","func":"msg.oidname=msg.payload;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":645,"y":630,"wires":[["f904521a37541262"]]},{"id":"f904521a37541262","type":"snmp subtree","z":"742cc87db4d12986","host":"","version":"2c","timeout":5,"community":"public","auth":"noAuthNoPriv","authprot":"MD5","privprot":"DES","oids":"1.3.6.1.2.1.2.2.1.7","name":"enabled","x":780,"y":630,"wires":[["61f07bfeac929664"]]},{"id":"61f07bfeac929664","type":"function","z":"742cc87db4d12986","name":"rearrange","func":"msg.oidenabled=msg.payload;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":960,"y":630,"wires":[["d7cc69cd5610a75d"]]},{"id":"3dc30cea953826ff","type":"function","z":"742cc87db4d12986","name":"rearrange","func":"msg.oidlink=msg.payload;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":645,"y":675,"wires":[["716dccc551da5e1c"]]},{"id":"d7cc69cd5610a75d","type":"snmp subtree","z":"742cc87db4d12986","host":"","version":"2c","timeout":5,"community":"public","auth":"noAuthNoPriv","authprot":"MD5","privprot":"DES","oids":"1.3.6.1.2.1.2.2.1.8","name":"link","x":515,"y":675,"wires":[["3dc30cea953826ff"]]},{"id":"ae349a3b9038a208","type":"function","z":"742cc87db4d12986","name":"rearrange","func":"msg.oidspeed=msg.payload;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":960,"y":675,"wires":[["efeb4a90c9a3ab32"]]},{"id":"716dccc551da5e1c","type":"snmp subtree","z":"742cc87db4d12986","host":"","version":"2c","timeout":5,"community":"public","auth":"noAuthNoPriv","authprot":"MD5","privprot":"DES","oids":"1.3.6.1.2.1.2.2.1.5","name":"speed","x":770,"y":675,"wires":[["ae349a3b9038a208"]]},{"id":"1d59a996087987c2","type":"function","z":"742cc87db4d12986","name":"rearrange","func":"msg.oidtx=msg.payload;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":645,"y":720,"wires":[["761a1aaa3d81c676"]]},{"id":"efeb4a90c9a3ab32","type":"snmp subtree","z":"742cc87db4d12986","host":"","version":"2c","timeout":5,"community":"public","auth":"noAuthNoPriv","authprot":"MD5","privprot":"DES","oids":"1.3.6.1.2.1.2.2.1.10","name":"tx","x":515,"y":720,"wires":[["1d59a996087987c2"]]},{"id":"761a1aaa3d81c676","type":"snmp subtree","z":"742cc87db4d12986","host":"","version":"2c","timeout":5,"community":"public","auth":"noAuthNoPriv","authprot":"MD5","privprot":"DES","oids":"1.3.6.1.2.1.2.2.1.16","name":"rx","x":770,"y":720,"wires":[["97dca3846ee3bd95"]]},{"id":"bfd8ad8abe116d82","type":"function","z":"742cc87db4d12986","name":"rearrange","func":"msg.oiddevice=msg.payload[0].value.replace(\".darkworld.mnt\",\"\");\nmsg.oidlocation=msg.payload[1].value;\nmsg.oiduptime=msg.payload[2].value;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":645,"y":585,"wires":[["730ece6b9f6bd8dc"]]},{"id":"dd31072fb613809b","type":"function","z":"742cc87db4d12986","name":"host=ap1","func":"msg.host=\"10.10.14.21:161\";\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":290,"y":810,"wires":[["deb440573b10d7a2"]]},{"id":"730ece6b9f6bd8dc","type":"snmp subtree","z":"742cc87db4d12986","host":"","version":"2c","timeout":5,"community":"public","auth":"noAuthNoPriv","authprot":"MD5","privprot":"DES","oids":"1.3.6.1.2.1.31.1.1.1.18","name":"custom name","x":800,"y":585,"wires":[["a2064eb09424bde2"]]},{"id":"a2064eb09424bde2","type":"function","z":"742cc87db4d12986","name":"rearrange","func":"msg.oidcustomname=msg.payload;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":960,"y":585,"wires":[["1afa5a5f1b2ced5c"]]},{"id":"df6196fbcdc8a9b6","type":"function","z":"742cc87db4d12986","name":"host=router","func":"msg.host=\"10.10.12.1:161\";\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":300,"y":585,"wires":[["deb440573b10d7a2"]]},{"id":"861e29b536dc3aad","type":"function","z":"742cc87db4d12986","name":"host=switch1","func":"msg.host=\"10.10.14.11:161\";\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":300,"y":630,"wires":[["deb440573b10d7a2"]]},{"id":"adad593d0138f83d","type":"function","z":"742cc87db4d12986","name":"host=switch2","func":"msg.host=\"10.10.14.12:161\";\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":300,"y":675,"wires":[["deb440573b10d7a2"]]},{"id":"2bd20ce8f3574b39","type":"function","z":"742cc87db4d12986","name":"host=switch3","func":"msg.host=\"10.10.14.13:161\";\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":300,"y":720,"wires":[["deb440573b10d7a2"]]},{"id":"f8e32a5923560d99","type":"function","z":"742cc87db4d12986","name":"host=switch4","func":"msg.host=\"10.10.14.14:161\";\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":300,"y":765,"wires":[["deb440573b10d7a2"]]},{"id":"541ade28.b4a62","type":"server","name":"Home Assistant","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"","connectionDelay":false,"cacheJson":false,"heartbeat":false,"heartbeatInterval":"","areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m","enableGlobalContextStore":true}]