[{"id":"222545a6.ab604a","type":"debug","z":"1b706be0.aa739c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":740,"y":440,"wires":[]},{"id":"9d4a09ee.86667","type":"inject","z":"1b706be0.aa739c","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":300,"y":440,"wires":[["b4090c34.2836a8"]]},{"id":"bd9967b1.9be7f8","type":"inject","z":"1b706be0.aa739c","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":240,"y":560,"wires":[["2b696141.0d93c6"]]},{"id":"b4090c34.2836a8","type":"function","z":"1b706be0.aa739c","name":"","func":"\nflow.set(\"FishMax\", 250, \"FishFeederMax\");\nflow.set(\"FishResult\", 10, \"FishFeederResult\");\nflow.set(\"reduce\", 1, \"FishFoodReduce\");","outputs":1,"noerr":0,"x":500,"y":440,"wires":[["222545a6.ab604a"]]},{"id":"2b696141.0d93c6","type":"function","z":"1b706be0.aa739c","name":"","func":"var mo = flow.get([\"FishMax\", \"FishResult\", \"reduce\"]);\nvar po = flow.get(\"FishMax\" - \"reduce\");\n\nmsg.payload = mo;\n\nreturn msg;","outputs":1,"noerr":0,"x":500,"y":580,"wires":[["82bf53f7.d78c7"]]},{"id":"82bf53f7.d78c7","type":"debug","z":"1b706be0.aa739c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":720,"y":580,"wires":[]}]
So in my settings.js i have created a context file save, and the fucntion node returns the values i set into the function with flow.set, so slowly getting there now whats the best way to reduce the intial amount
Flow.get ("1") - Flow.get("2") = Flow.set("3")