Hello,
I would like to have the label of the Numeric Items displayed in color depending on a status.
The heating can be controlled via the dashboard. For this I have created a numeric item. If the window in the room is open, the label should be displayed in red.
If I now send a string, the numeric item becomes "undefined" - until the current value is transmitted again.
Is it possible to rebuild this so that there is no "undefined" if the window sends open or closed?
Here is my flow:
[{"id":"2c3f9285.10fb0e","type":"tab","label":"Flow 3","disabled":false,"info":""},{"id":"dab8da1a.47c9c8","type":"change","z":"2c3f9285.10fb0e","name":"","rules":[{"t":"move","p":"payload","pt":"msg","to":"color","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":664.5,"y":272,"wires":[["3b88621e.236cde","85134bd7.110ea8"]]},{"id":"c42b4e65.94cfc","type":"switch","z":"2c3f9285.10fb0e","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"closed","vt":"str"},{"t":"eq","v":"open","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":402.5,"y":283,"wires":[["dab8da1a.47c9c8"],["e28a4ff8.511fa"]]},{"id":"e28a4ff8.511fa","type":"change","z":"2c3f9285.10fb0e","name":"","rules":[{"t":"move","p":"payload","pt":"msg","to":"color","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":665,"y":314,"wires":[["3b88621e.236cde","85134bd7.110ea8"]]},{"id":"b36a0f2b.e2d1a","type":"inject","z":"2c3f9285.10fb0e","name":"","topic":"","payload":"open","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":233.5,"y":260,"wires":[["c42b4e65.94cfc"]]},{"id":"dd326319.c6e3c","type":"inject","z":"2c3f9285.10fb0e","name":"","topic":"","payload":"closed","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":231,"y":309,"wires":[["c42b4e65.94cfc"]]},{"id":"85134bd7.110ea8","type":"debug","z":"2c3f9285.10fb0e","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":977.5,"y":367,"wires":[]},{"id":"3b88621e.236cde","type":"ui_numeric","z":"2c3f9285.10fb0e","name":"","label":"<font color= {{msg.color}} > Badezimmer oben </font>","tooltip":"","group":"995163c7.b641f","order":2,"width":"0","height":"0","wrap":false,"passthru":false,"topic":"payload.heat","format":"{{value}}","min":0,"max":"30","step":"0.5","x":550,"y":570,"wires":[["85134bd7.110ea8"]]},{"id":"81624baa.083f28","type":"inject","z":"2c3f9285.10fb0e","name":"","topic":"","payload":"18.5","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":249.5,"y":576,"wires":[["3b88621e.236cde"]]},{"id":"995163c7.b641f","type":"ui_group","z":"","name":"S1","tab":"dd7127ad.c3f3b8","disp":false,"width":"6","collapse":false},{"id":"dd7127ad.c3f3b8","type":"ui_tab","z":"","name":"Home","icon":"dashboard"}]
Thanks.
Regards
Hermann