Closed 3sztof closed 5 years ago
Thank you for the report @3sztof, I can reproduce this!
LED will no longer be previous valid value but instead gray-invalid Refreshing will show the LED's proper, valid value
So I've narrowed it down to the node receiving the latest msg
before it's element has been rendered, researching how to deal with this situation.
I've pushed a fix to the branch https://github.com/Adorkable/node-red-contrib-ui-led/tree/feature/tabsUpdateBug , if you have a chance please give it a try and see if this fixes the issue for you without introducing new ones ;)
Otherwise I'll push the update in the next few days!
Closing with fix release
Oy, changes didn't make it into 0.2.2, my bad. They're in 0.2.3!
I'm already using 0.2.3, Node-red (in docker) v0.20.2
The issue still exist
ps. sorry if I didn't find this issue, default search is searching only in open issues :P
@darkoddio no worries! Can you paste a set of flows that demonstrate the issue?
Just click the switch and change between tab1 and tab2 and you will see the led turn grey again.
One more suggestion: if you can implement node.status() would be fantastic :)
[{"id":"2f939364.d8796c","type":"ui_led","z":"cb054648.0d7a58","group":"9b7ac535.4c3aa8","order":0,"label":"","colorForValue":[{"color":"red","value":"false","valueType":"bool"},{"color":"green","value":"true","valueType":"bool"}],"name":"","x":290,"y":2660,"wires":[]},{"id":"9ac7d15.f6fe83","type":"ui_led","z":"cb054648.0d7a58","group":"407eebd8.3608e4","order":0,"label":"","colorForValue":[{"color":"red","value":"false","valueType":"bool"},{"color":"green","value":"true","valueType":"bool"}],"name":"","x":290,"y":2720,"wires":[]},{"id":"e498cee9.2287f","type":"debug","z":"cb054648.0d7a58","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":310,"y":2620,"wires":[]},{"id":"4988e325.f6e3cc","type":"debug","z":"cb054648.0d7a58","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":310,"y":2760,"wires":[]},{"id":"1fcbfb35.3d7535","type":"ui_switch","z":"cb054648.0d7a58","name":"","label":"switch","tooltip":"","group":"9b7ac535.4c3aa8","order":1,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":110,"y":2640,"wires":[["e498cee9.2287f","2f939364.d8796c"]]},{"id":"8913be8e.72efe","type":"ui_switch","z":"cb054648.0d7a58","name":"","label":"switch","tooltip":"","group":"407eebd8.3608e4","order":1,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":110,"y":2740,"wires":[["9ac7d15.f6fe83","4988e325.f6e3cc"]]},{"id":"9b7ac535.4c3aa8","type":"ui_group","z":"","name":"group1","tab":"365a841d.277acc","disp":true,"width":"6","collapse":false},{"id":"407eebd8.3608e4","type":"ui_group","z":"","name":"group2","tab":"3bad61f6.cc997e","disp":true,"width":"6","collapse":false},{"id":"365a841d.277acc","type":"ui_tab","z":"","name":"Tab1","icon":"dashboard","disabled":false,"hidden":false},{"id":"3bad61f6.cc997e","type":"ui_tab","z":"","name":"Tab2","icon":"dashboard","disabled":false,"hidden":false}]
@darkoddio I am unable to reproduce this issue with your pasted flow switching back and forth between tabs, are you sure you're on the latest release? Is there anything particular about your tabs, or your Node-RED install?
Re: status display please post suggestions in #6!
The leds turn gray and do not change state after switching the UI tabs. Refreshing the whole UI turns them back on (it seems that the state is stored - it's a display issue).