Efficient way to modify the the device's variables before storing them in a bucket

(topic deleted by author)