Ron
(Ron)
December 4, 2016, 11:23pm
88
Yea, I was trying to play with altering preferences programmatically but could not get it to work. I was informed via this forum that preferences can not be altered this way.
Here are two threads that might help.
I’m working on a custom device type and in the preferences section I would like to write to the values. So for example the preference section is used to allow a user to enter a temperature offset. I can access the value in the offset but I can’t figure out the syntax to write a new one programmatically. Can someone help with this?
Hi All,
Is there any way to dynamically fill a preferences field from code?
In my SmartApp, I am expanding on @brianwilson ’s ThingSpeak code, but making the interface a little more user-friendly by automatically creating a channel on the user’s behalf.
My approach is to give the user an option to use an existing channel or create a new one. That means that I have options in my settings for “Channel ID” and “Channel Key”, but if those are empty, I create a new channel. I would like to fill in those fields once I create a channel and then use those values for my actual POSTs.
Does anybody know how to do this? Are preferences uni-directional?
Thanks,
Dan Kurin