Numbers/Doubles in Preferences wont Allow Decimal numbers

I have had a Smartapp running for several years without issue. Recently I went into the app setting and tried to modify one of the numeric values in the Preference section. It appears that “latest” changes wont allow decimal numbers,

Here is the code

		input "lowKWhCost", "number",
			title: "Low Period Cost in \$/kWh",
			description: "Your Low Period Cost Per kWh",
			defaultValue: "0.065" as Double,
			required: false,
			displayDuringSetup: true

If I go into the settings of this app I cannot change anything (of any of the settings) because it says this particular field is incorrect. If I replace the default value with a whole number all is well.

What is wrong with what I have now and what do I need to change?

You have defined the input as being of type number, which means an integer. Perhaps you could try decimal?

1 Like