thanks collin, this works well
but unfortunately the button does not react on my inputs from the function node:
[{"id":"54ba0d4afac08d15","type":"ui_button","z":"a64b091a.a1bf2","name":"","group":"1495fa22.b16436","order":2,"width":1,"height":1,"passthru":false,"label":"OFF","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"1","payloadType":"num","topic":"topic","topicType":"msg","x":630,"y":460,"wires":[["89046dec383772c6"]]},{"id":"89046dec383772c6","type":"function","z":"a64b091a.a1bf2","name":"function 1","func":"var x = 0;\nx = global.get(\"EPEX.Active\");\nif (x==0){\n x = 1;\n global.set(\"EPEX.Active\",1);\n msg.background = \"red\";\n return [msg,null];\n}\nelse if (x==1){\n x = 0;\n global.set(\"EPEX.Active\",0);\n msg.background = \"green\";\n return [null,msg];\n}\n\nreturn msg;","outputs":2,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":800,"y":460,"wires":[["54ba0d4afac08d15"],["54ba0d4afac08d15"]]},{"id":"1495fa22.b16436","type":"ui_group","name":"Standard","tab":"f420fdaa.3226a8","order":1,"disp":true,"width":8,"collapse":false},{"id":"f420fdaa.3226a8","type":"ui_tab","name":"EPEX Strom","icon":"dashboard","order":12,"disabled":false,"hidden":false}]