[SOLVED] How to set default values for Input controls from an exisiting device

Hi

It seems a major thing missing (either feature or documentation) from Input Controls is the ability to set the default value of an input based on the current value of a relevant device.

For instance with the examples using the slider to set a brightness level or the toggle inputs to change the state of a device.

Unfortunately if someone was to revisit a page with the current controls the state of these controls do not reflect the current state of the device, but a static default value.

This could lead to problems (turning off something that is on ) because the state for the toggle doesn’t reflect the current state. Then if the button trigger is fired the static default state is sent rather than the current state turning off a device.

The same would happen with the brightness slider (brightness has been set, someone revisits the page) the slider is at 50 (even though previously the value is set to 20). Some other value is being changed and the person forgets to reset the slider to the current value and inadvertently resets brightness to the default.

I hope I just missed something in the documentation :wink:

Thanks

Tim

You’re part of a growing chorus of users who are requesting this feature. We’re looking into how best to handle this as there are some challenges given the input controls block’s current ability to fire workflows and send commands to multiple devices at once (how do you decide which device to use for the default values). We’ll keep you posted on when we have this resolved.

Hi Dylan.

From my perspective something like your conditional formatting.
Use handlebars - but that does mean we need to be able to query the state of a device.

How that plays out when you setting the value of multiple devices should be left to the person creating the control block.

Just me 2c worth :wink:

@Tim_Hoffman the long-awaited “state-reflecting input controls” feature is finally live! Read more about the feature here -