Apps with radio buttons

I keep getting deeper into this. Today's question: Is it possible to use radio buttons in custom app and device pages?

I've used text inputs, buttons, and drop downs. Now I have a use for some good 'ole radio buttons. My searching hasn't been too fruitful.

Not without doing some UI tricks (think of newer apps like Room Lighting and the newer incantations of Rule 5.1), which are a bit difficult and not "officially" a part of the UI framework.

But there are ways to allow a single selection, generally the intent of radio buttons. Typically, you would make an input with type: enum and, as you may guess, without multiple: true (the default is false, though you can specify that too if you want). You may need to re-think how text is displayed in your UI for this to make sense, as extremely long strings will typically not display well in drop-downs (e.g., perhaps consider more verbosity elsewhere, say in a paragraph, if needed to explain what the drop-downs are).

Hmm, a dropdown instead of a radio group. That could do the trick and actually be a cleaner interface.

Download the Hubitat app