Ui_numeric and msg.enable

Hi everybody!

I found a problem in my flow: I want to enable/disabe some controls. It works fine for buttons but not for numeric inputs. If I send a
msg.enable = false
to a button, it gets greyed out. If I do the same with a ui_numeric, it gets greyed out as well. But at the same time the value is set to 0. This is undesired for me.

I found the same description in a post 3 years ago: Numeric input state

I wonder if there is a way to get that working, does anybody have a hint for me? Thanks!

If you feed a msg.payload with the numeric value you wish displayed along with msg.enabled, it should display that number.
e.g.

[{"id":"3a9e8077.c2e1c","type":"inject","z":"bf9e1e33.030598","name":"disable with payload","props":[{"p":"payload"},{"p":"enabled","v":"false","vt":"bool"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"6","payloadType":"num","x":150,"y":60,"wires":[["49895e9d.c6fb9"]]},{"id":"49895e9d.c6fb9","type":"ui_numeric","z":"bf9e1e33.030598","name":"","label":"numeric","tooltip":"","group":"2d4fe667.28f8ba","order":9,"width":0,"height":0,"wrap":false,"passthru":false,"topic":"topic","topicType":"msg","format":"{{value}}","min":0,"max":10,"step":1,"className":"","x":380,"y":100,"wires":[["9efd2c72.cb6e88"]]},{"id":"bd84e114.515c88","type":"inject","z":"bf9e1e33.030598","name":"","props":[{"p":"enabled","v":"true","vt":"bool"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":140,"y":140,"wires":[["49895e9d.c6fb9"]]},{"id":"9efd2c72.cb6e88","type":"debug","z":"bf9e1e33.030598","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":620,"y":100,"wires":[]},{"id":"2d4fe667.28f8ba","type":"ui_group","name":"demo","tab":"1caa8458.b17814","order":1,"disp":true,"width":"12","collapse":false},{"id":"1caa8458.b17814","type":"ui_tab","name":"Demo","icon":"dashboard","order":1,"disabled":false,"hidden":false}]

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.