Can a SmartApp modify it's inputs? (groovy.lang.MissingPropertyException error)

I’m writing a SmartApp to control snow melting equipment (attached to switches) based on weather data. Weather data is pulled hourly and snow level (and melt) is calculated, resulting in a “snow level” prediction (the weather API doesn’t seem to have a way to get this directly).

In the app I am using the settings interface to display current status, calculated snow level, aggregate power usage and hourly history data (temp, precipitation, and control decision history). This is all working well, except that I would like to allow the user to directly edit the snow level if the calculated level is wrong. Ideally there would be a user editable preference field that the app could also modify. However, when I define an input variable as such:

input "snow_level", "float", title: "Snow level (in mm)", required: true, defaultValue: 0.0

I can not modify it in the app itself. That is these lines result in the following error. You can see that the variable is readable but the ide pretends it doesn’t exist when writing to it.

log.debug "trying to decrement snow_level which is ${snow_level}"
snow_level = snow_level - snow_melt

groovy.lang.MissingPropertyException: No such property: snow_level for class: script1448248932993837084509 @ line 223
debug trying to decrement snow_level which is 5.0

Is there a way that I can make this property modifiable by the program (e.g. via a scheduled callback)?

Not sure if it is noted as well as it should be in the documentation but as far as I know inputs are read only exept when changed through the app interface. That is the type of thing that should be stored in state if it is to be modified by the smartapp later.

All inputs from the user are stored in a read-only map called settings. You can access the value entered by the user by indexing into the map using the name as the key (settings.someName)
Preferences & Settings

Thanks for your response and confirmation of the behavior I’m seeing, Andy.

Is there a way to construct a mechanism to adjust a stored value? For example, if I have two variables:
input adjustment (say a float)

If the interface displays adjustment, and that adjustment is applied to state (e.g. state.amount += adjustment) in updated(), the adjustment value continues to be sticky (which is going to be a source of error when a user goes to modify another parameter and this is applied again).

Is there a way to construct a button – e.g. amount-up, amount-down buttons ? It seems like this can happen in a virtual device but not in a smart app.