To change the font colour of the text displayed in ui_text node in dashboard depending on the value of the input. this will not work in html5
Last active
March 29, 2023 01:35
-
-
Save smanjunath211/91bb9ea894340c76796b786e56389b71 to your computer and use it in GitHub Desktop.
Change Color of ui_text in Dashboard based on input value
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{"id":"917b8d1e3d71db60","type":"change","z":"d1d5b47695a238e0","name":"","rules":[{"t":"set","p":"fcolor","pt":"msg","to":"red","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":760,"y":380,"wires":[["027c4571b7afc0e2"]]},{"id":"39af0df5fe1c06a2","type":"switch","z":"d1d5b47695a238e0","name":"","property":"payload","propertyType":"msg","rules":[{"t":"lt","v":"0","vt":"num"},{"t":"eq","v":"0","vt":"num"},{"t":"gt","v":"0","vt":"num"}],"checkall":"true","repair":false,"outputs":3,"x":570,"y":420,"wires":[["917b8d1e3d71db60"],["2385c18f0f324c76"],["a75de53149517996"]]},{"id":"027c4571b7afc0e2","type":"ui_text","z":"d1d5b47695a238e0","group":"0df4552f9d69039d","order":7,"width":9,"height":6,"name":"","label":"Value","format":"<font face='arial'><font size=6><font color={{fcolor}}>{{msg.payload}}","layout":"row-spread","className":"","x":950,"y":420,"wires":[]},{"id":"c4dcf81b6c43aebd","type":"ui_button","z":"d1d5b47695a238e0","name":"","group":"0df4552f9d69039d","order":8,"width":3,"height":2,"passthru":false,"label":"Zero","tooltip":"","color":"","bgcolor":"","className":"","icon":"fa-heartbeat","payload":"0","payloadType":"num","topic":"topic","topicType":"msg","x":390,"y":420,"wires":[["39af0df5fe1c06a2"]]},{"id":"cf35e882013e04b0","type":"ui_button","z":"d1d5b47695a238e0","name":"","group":"0df4552f9d69039d","order":9,"width":3,"height":2,"passthru":false,"label":"+10","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"10","payloadType":"num","topic":"topic","topicType":"msg","x":390,"y":460,"wires":[["39af0df5fe1c06a2"]]},{"id":"2ff6f57ce6bbc73f","type":"ui_button","z":"d1d5b47695a238e0","name":"","group":"0df4552f9d69039d","order":4,"width":3,"height":2,"passthru":false,"label":"-10","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"-10","payloadType":"num","topic":"topic","topicType":"msg","x":390,"y":380,"wires":[["39af0df5fe1c06a2"]]},{"id":"2385c18f0f324c76","type":"change","z":"d1d5b47695a238e0","name":"","rules":[{"t":"set","p":"fcolor","pt":"msg","to":"yellow","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":760,"y":420,"wires":[["027c4571b7afc0e2"]]},{"id":"a75de53149517996","type":"change","z":"d1d5b47695a238e0","name":"","rules":[{"t":"set","p":"fcolor","pt":"msg","to":"green","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":760,"y":460,"wires":[["027c4571b7afc0e2"]]},{"id":"0df4552f9d69039d","type":"ui_group","name":"DEFAULT","tab":"f3a8a67ff0904e39","order":1,"disp":false,"width":"44","collapse":false,"className":""},{"id":"f3a8a67ff0904e39","type":"ui_tab","name":"HOME","icon":"dashboard","order":2,"disabled":false,"hidden":false}] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment