Seeking clarification on preferences{} and actual device params

I’m using it in the updated() event.

Thanks for the info! I think this confirms what I was thinking, updateSetting may only work when it’s used based on a user making changes in settings. I’m going to check if there’s any way to establish a session based on what the error is saying, but I’m not too sure it’s possible. Might be a security thing to prevent settings randomly changing on a user.

This is how I use updateSetting and deleteSetting in smartapp.