@hotNipi Sorry for disturbing again..
Based on your code I have done this, but it works not "stable".
The text is in general always toggling as expected, but the color of the icon does not.
Sometimes the color is toggling correctly.
Sometimes the color changes to the correct value if I switch to another Tab and back to Tab ToggleButton.
Sometimes it works if template node - Template type is set to "Added to site..".
Sometimes it works if template node - Template type is set to "Widget in group".
Sometimes it takes a long time until something happens...
I have no clue why this happens!
Can you or anybody else help me?
[{"id":"927ad427911e06d1","type":"inject","z":"2e1d71bd03cf9513","name":"red icon","props":[{"p":"ui_control.icon","v":"fa-home fa-2x coloredIcon red","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","x":100,"y":680,"wires":[["9af5b2c6.42c3d"]]},{"id":"91e8ce7cf19887a4","type":"ui_template","z":"2e1d71bd03cf9513","group":"110f893b.a0f1d7","name":"","order":1,"width":0,"height":0,"format":"<style>\n .coloredIcon.red{\n color :red;\n }\n .coloredIcon.blue{\n color :blue;\n }\n</style>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"global","className":"","x":900,"y":420,"wires":[[]]},{"id":"e3389cdb9cd24f47","type":"inject","z":"2e1d71bd03cf9513","name":"blue icon","props":[{"p":"ui_control.icon","v":"fa-home fa-2x coloredIcon blue","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":100,"y":720,"wires":[["9af5b2c6.42c3d"]]},{"id":"29e7d45f.dea00c","type":"change","z":"2e1d71bd03cf9513","name":"","rules":[{"t":"set","p":"toggle-me","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":870,"y":480,"wires":[["38a5d91c.0be77e"]]},{"id":"1b6fe3d1.5580a4","type":"switch","z":"2e1d71bd03cf9513","name":"","property":"toggle-me","propertyType":"flow","rules":[{"t":"true"},{"t":"false"}],"checkall":"true","repair":false,"outputs":2,"x":400,"y":700,"wires":[["8991bf63.f4d578"],["5fec9b00.abd0d4"]]},{"id":"8cddecf3.4a24f","type":"change","z":"2e1d71bd03cf9513","name":"","rules":[{"t":"set","p":"toggle-me","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":870,"y":800,"wires":[["38a5d91c.0be77e"]]},{"id":"1e692860.33a6d","type":"change","z":"2e1d71bd03cf9513","name":"","rules":[{"t":"set","p":"toggle-me","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":870,"y":540,"wires":[["38a5d91c.0be77e"]]},{"id":"dc371121.720208","type":"inject","z":"2e1d71bd03cf9513","name":"","repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"false","payloadType":"bool","x":90,"y":480,"wires":[["29e7d45f.dea00c"]]},{"id":"5fec9b00.abd0d4","type":"change","z":"2e1d71bd03cf9513","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"true","tot":"bool"},{"t":"set","p":"ui_control.icon","pt":"msg","to":"fa-home fa-2x coloredIcon blue","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":580,"y":820,"wires":[["8cddecf3.4a24f","9af5b2c6.42c3d","629ab238496a40fa","c21e502359438c40"]]},{"id":"8991bf63.f4d578","type":"change","z":"2e1d71bd03cf9513","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"false","tot":"bool"},{"t":"set","p":"ui_control.icon","pt":"msg","to":"fa-home fa-2x coloredIcon red","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":580,"y":600,"wires":[["1e692860.33a6d","9af5b2c6.42c3d","629ab238496a40fa","c21e502359438c40"]]},{"id":"38a5d91c.0be77e","type":"ui_text_input","z":"2e1d71bd03cf9513","name":"","label":"","tooltip":"","group":"110f893b.a0f1d7","order":3,"width":0,"height":0,"passthru":true,"mode":"text","delay":300,"topic":"","sendOnBlur":true,"className":"","topicType":"str","x":1240,"y":700,"wires":[[]]},{"id":"9af5b2c6.42c3d","type":"ui_button","z":"2e1d71bd03cf9513","name":"","group":"110f893b.a0f1d7","order":1,"width":0,"height":0,"passthru":false,"label":"button","tooltip":"","color":"","bgcolor":"","className":"","icon":"{{icon}}","payload":"true","payloadType":"bool","topic":"","topicType":"str","x":270,"y":700,"wires":[["1b6fe3d1.5580a4"]]},{"id":"f40c5c0.c964128","type":"comment","z":"2e1d71bd03cf9513","name":"At startup set default value (false)","info":"","x":160,"y":440,"wires":[]},{"id":"e62c42b2.ed0408","type":"comment","z":"2e1d71bd03cf9513","name":"if flow.state is true set it to false, if flow.state is false set it to true","info":"","x":720,"y":700,"wires":[]},{"id":"629ab238496a40fa","type":"debug","z":"2e1d71bd03cf9513","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":950,"y":660,"wires":[]},{"id":"c21e502359438c40","type":"debug","z":"2e1d71bd03cf9513","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"ui_control","targetType":"msg","statusVal":"","statusType":"auto","x":940,"y":740,"wires":[]},{"id":"110f893b.a0f1d7","type":"ui_group","name":"ToggleButton","tab":"7179c13.0628d4","order":13,"disp":true,"width":"6","collapse":false,"className":""},{"id":"7179c13.0628d4","type":"ui_tab","name":"ToggleButton","icon":"dashboard","order":1,"disabled":false,"hidden":false}]