I have made modifications to an excellent weather driver here. However, I'm stuck just a few feet from the finish line.
In a driver, there a preference that can be saved. If it is overridden by a function in the driver itself via a command, how to update that Preference? Updating an attribute shows immediately on the device's Command page. However, I can not get any change to stick as a preference.
(ignore any extraneous commas or parenthesis. Just showing what I am trying to do and my attempt at it.)
I used type:"bool" in the example, but updateSettings() can take other types like "string" or "number" for the type.
Also, in my example the types are different. Setting is a true/false bool, and my attribute is an enum using "enabled, disabled", but if you keep the types the same it is even easier, and you do not have to evaluate the setting to set the attribute, you can just make it match the value.