Closed flatsiedatsie closed 5 years ago
If you change the config object, you have to write code to handle the transition. The only other way to have it changed is to make the user go in and redo their config. There is no way for the gateway to know what your intent was in changing the config object, so it can't be handled automatically.
For an example (in JS), see here: https://github.com/mozilla-iot/gpio-adapter/blob/master/gpio-adapter.js#L253-L285
Thanks. I actually found the issue, I was still using the old add-on name in the adapter class. Sorry to waste your time.
No worries! Glad you got it figured out.
I changed the name of a variable in the JSON of the addon. But no matter what I do, it keeps referring to the old variable name.
Here's the add-on json:
Here's the config from the database printed as a string:
I tried updating it so a new version, to see if that would override the value. I tried all kinds of ways of enabling and re-enabling the add-on, changing the configuratino settings. But not matter what I do, I cannot get the new variable "Password" to be stored or retreived. Even though in the settings interface it does say the correct shorter name.
I will not try removing the add-on.