[{"id":"4d18ea91.fe6d24","type":"function","z":"9f6752b0.b55988","name":"Be-/Entladen","func":"var PAC3 = msg.payload.PAC3;\nvar msg1 = {};\nvar msg2 = {};\nvar Bel;\nvar Ent;\nif(PAC3 < 0 ) {\n Bel = (PAC3 * -1);\n Ent = 0;\n msg1.payload = Bel;\n msg2.payload = Ent;\n msg1.topic = \"Beladen\";\n msg2.topic = \"Entladen\";\n} else {\n Ent = PAC3;\n Bel = 0;\n msg1.payload = Bel;\n msg2.payload = Ent;\n msg1.topic = \"Beladen\";\n msg2.topic = \"Entladen\";\n}\nreturn [msg1,msg2];","outputs":2,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1330,"y":1800,"wires":[["30497b15.ec7ca4","fe2ee3c.6cc092"],["f551193.c377de8","fe2ee3c.6cc092"]]},{"id":"a1bb3028.40353","type":"debug","z":"9f6752b0.b55988","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1830,"y":1920,"wires":[]},{"id":"30497b15.ec7ca4","type":"ui_text","z":"9f6752b0.b55988","group":"d5972738.a29c7","order":2,"width":0,"height":0,"name":"Beladen","label":"<font color=green> Beladen","format":"{{msg.payload}} W","layout":"row-spread","x":1540,"y":1740,"wires":[]},{"id":"f551193.c377de8","type":"ui_text","z":"9f6752b0.b55988","group":"d5972738.a29c7","order":3,"width":0,"height":0,"name":"Entladen","label":"<font color=blue> Entladen","format":"{{msg.payload}} W","layout":"row-spread","x":1540,"y":1780,"wires":[]},{"id":"fe2ee3c.6cc092","type":"calculate","z":"9f6752b0.b55988","name":"Durchschnitt pro Minute","pauseType":"timed","calculation":"average","timeout":"1","timeoutUnits":"minutes","rate":"10","x":1590,"y":1840,"wires":[["203c272e.ef2308"]]},{"id":"203c272e.ef2308","type":"function","z":"9f6752b0.b55988","name":"runden","func":"var temp = msg.payload\nmsg.payload = parseFloat(temp.toFixed(1));\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1640,"y":1880,"wires":[["863d24d1.62ea3"]]},{"id":"863d24d1.62ea3","type":"join","z":"9f6752b0.b55988","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":1650,"y":1920,"wires":[["a1bb3028.40353"]]},{"id":"d5972738.a29c7","type":"ui_group","name":"SBS 2.5","tab":"69ee5cda.ec1a2c","order":2,"disp":true,"width":"5","collapse":false},{"id":"69ee5cda.ec1a2c","type":"ui_tab","name":"Batterie","icon":"fa-battery-half","order":2,"disabled":false,"hidden":false}]
I hope this is the solution
IĀ“ll check it tomorrow, when both values changes