Decimal input()s

I’m hoping one of you smart guys or gals can help me as everytime I reach out to SmartThings Developer Support they basically tell my to get lost (or don’t respond). The worst support I have ever experienced from any company. Thanks guys. Maybe @slagle or @jody.albritton would care to respond.
Anyway, enough bitching…

In my SmartApp I am trying to allow the user to input() a decimal value with range 0…* e.g.

input("triggerCompareToThingDifference", "decimal", title: "By how much?", multiple: false, required: true, submitOnChange: true, range: "0..*")

However although this allows me to enter a decimal value the SmartThings mobile app does not allow me to press Next. It just displays the following error message:

"Please check the value range of input fields"

Am I doing something wrong here or is this a bug in the SmartThings mobile app?

Also, does anyone know how to require a minimum range value > 0 but not 1. i.e. "0.1..*" (which does not work)?

Thanks for any help you can offer.

Anyone? What about you SmartThings guys @slagle, @jody.albritton?

I think what might be happening is you are basically saying please allow any positive number. Our platform already enforces this range by default so it might be choking on that. A bug I will check out, but does it work if you actually specify a range?

More information on range can be found here: http://docs.smartthings.com/en/latest/smartapp-developers-guide/preferences-and-settings.html

A range starting from “0…*” or “1…” both allow the user to enter a decimal value, such as 1.5, but when they try to click Next they receive the "Please check the value range of input fields" error message. This must be a bug? For info I’m using the Android mobile app.

Also, If the user changes a value and does not press enter but instead simply clicks Next the mobile app ignores the new value and uses the previous value. As the mobile app has now move to the next page the user will not be aware that it is still using the old value.

Finally, how do you use range to require the user to enter a value greater than 0 but without forcing them to start at 1? E.g. a range of “1…*” will not allow the user to enter 0.5. I would like to be able to require a range of 0.1 to *. How can I do this?

Thanks.

Any chance of a response @slagle?

Why not make your range wide enough for all possible scenarios. Just tried 0…1000 and that works. :slight_smile:

Two reasons why 0…1000 does not work (for decimal inputs).

  1. If the user enters a decimal value, e.g. 1.5, the SmartThing mobile app generates error "Please check the value range of input fields" when the user tries to click Next to move on to the next page (see OP). Did you test with decimal inputs and a multipage app?
  2. I would like the user to enter a value > 0. I am happy to use * for unlimited max but Zero is not a value I wish to allow the user to enter. However, the first issue is the main problem I have as it just does not work.

Tim @slagle the first issue is clearly a bug.

Should I just give up on using decimal input settings?

Ok I give up.

Thanks for proving just how bad the support is from this company.