Is it possible to reset preferences from a tile action method?

I’ve got the same issue. I want to be able to update the value of device.preferences from code. So linking to another thread which discusses this: Seeking clarification on preferences{} and actual device params

FYI, you can enumerate all devices using the following code, you just don’t seem to be able to change them:

device.preferences.each { p ->
	log.debug "$device.displayName: Preference: ${p}"
}