Change device driver to Device doesn't remove all

I think I've seen this previously, but I wonder if others see it as well.
I'm testing drivers - and one step of that is to 'clear' all the states and parm values. The old trick I use was the 'Change driver to "Device"' method.
I change a devices' driver to Device, and mash all the buttons to configure, clear state, schedule, children and values. Then I change back to my driver and begin my testing.
What I saw today gave me pause that this method doesn't clear everything. In the driver I was testing, I had enabled 'debug on' in the preferences. As I think we all know, options in the preferences are device driver specific - not all drivers give preferences, or the names of the preferences are different etc.
When I reenabled the test driver, I noted Debug was on. That shouldn't be the case if I understand correctly. My expectation is that the Database shouldn't have any value references. The event log and such should still maintain entries but the device should basically come up cleared and fully reset. Are there other ways besides blowing the device away completely, to 'start fresh' that others use? Please detail out your methods for us! Thanks.

Here's the part you're missing: nothing in the "Device" driver will clear settings, which is where everything under the "Preferences" section on the device detail page is stored. But there would rarely be a need to do this; anything a driver driver uses should be exposed in its UI and allow to you change it that way (unlike scheduled jobs, state, and other things you can't control directly outside of the driver code).

so I need to write another 'device' driver that clears settings, or mod the existing one to clear 'settings' as well - in my mind it would be obvious as yet another button to mash when testing - preferences are impactful when left behind on trying to clear a device completely so I see the results as vanilla as the driver author expects.
eg; driver requires a min / max value. While testing I override it. author updates driver and wants clean re-test. my prior test values are still there. With 2 weeks between testing version changes, I can't remember 'oh. I changed that'.
Thank you for explaining the shortcoming.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.