Dashboard Combo Box

Is it possible to have a combo box for a string variable in a Hubitat Dashboard?

I’m wanting to allow only the values of high, medium, low and off to be allowed.

These values will then be used in a rule that controls the settings of a device.

There are likely several options to do this. The one that comes to mind is to setup a 4-button virtual button. Then those 4 buttons could be added to the dashboard.

In parallel, a rule could be set to enter one of the values (High, Medium, etc.) in the string variable depending on what button was pressed.

Alternatively, the rule could be set to directly control the settings of the device, depending on what button is pressed.

2 Likes

I created a 4 button virtual device, but on the dashboard it looks like a single button.

1 Like

Correct. It is possible to specify which of the 4 buttons of the device is pressed within the dashboard tile setting:

How do I change the text on each button, so that the user knows what button is being pressed?

Also, is there supposed to be some type of “animation” when a button is pressed, so that it is clear that a button has in fact been pressed?

As much as I liked @Sebastien 's solution, there can be some extra's depending on what you want to achieve that are a bit tedious to setup. I did something similar with a mode selector in a dashboard I no longer use:

image

I reluctantly reference this because this involved about 3-4 layers of tiles that feels overly complicated, even for me :-). That said, I expect @Sebastien may have had something similar in mind, even just a selection of buttons to press on the dashboard. The indicator for which one is active is what mostly requires the additional effort to setup additional virtual switches and overlaps for buttons to make sure the buttons capture the presses on the dashboard, plus formatting.

I don't have a "nice" alternative for you, but can guide you through this more complicated setup if you would like something similar.

As @sburke781 indicates above, buttons do not react when pressed. Changing their names can also be a bit complexe.

My approach with something like this with using buttons would be to add a « Text » button on top or to the side of the button.

Other options would require the use of CSS coding, or using Smartly (Which is an external too that I’m not certain is still supported).

Otherwise, also as described by @sburke781, individual switches could be used that show that the device setting is active. This would also require that rules be setup to turn them off when the device’s setting changes.

1 Like

I'd echo @Sebastien 's echoing of my own comments... :slight_smile: Something like what I posted or with a different aesthetic is definitely possible, but the setup is a little cumbersome. That said, if you are keen, I am happy to work through the setup if/when time permits,,,,

1 Like