List of fixed values in the UI for a subflow

Hi,
I need to show a list of fixed values as string inputs in the UI of a subflow:

Schermata 2021-02-01 alle 11.37.14

The user should select one out of 10 fixed values for DEVICE, in a dropdown list.
How can I do?

There are multiple options.

Make sure to go through the documentation.

As Bakman says, once you have created the variable, click the down arrow next to its name.

Select 'Select' from the input type dropdown.

Once you have done this, click the furthest right dropdown and you will get an add element ui. Below is an example subflow you can import.

[{"id":"bc04e851.d49ed8","type":"subflow","name":"Subflow 1","info":"","category":"","in":[],"out":[],"env":[{"name":"DeviceNo","type":"str","value":"Dev1","ui":{"icon":"font-awesome/fa-laptop","type":"select","opts":{"opts":[{"l":{"en-US":"Device 1"},"v":"Dev1"},{"l":{"en-US":"Device 2"},"v":"Dev2"},{"l":{"en-US":"Device 3"},"v":"Dev3"}]}}}],"color":"#DDAA99","status":{"x":160,"y":30,"wires":[]}},{"id":"6f86169.b529de8","type":"debug","z":"bc04e851.d49ed8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":360,"y":80,"wires":[]},{"id":"43b1d3cf.f08e5c","type":"inject","z":"bc04e851.d49ed8","name":"","props":[{"p":"payload"}],"repeat":"1","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"DeviceNo","payloadType":"env","x":220,"y":80,"wires":[["6f86169.b529de8"]]},{"id":"1738eaf6.f5d395","type":"subflow:bc04e851.d49ed8","z":"ced96e30.86933","name":"","env":[{"name":"DeviceNo","value":"Dev2","type":"str"}],"x":480,"y":540,"wires":[]}]

1 Like

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