This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Backup/restore object values with storage.set/get?
#1
Hi,

I have a script which runs some logic for a scene (e.g. dim the lights, set color X for RGB, etc.) - but before running it, I want to be able to provide a list of group addresses to 'backup', and then to 'restore' them after the scene finishes - can anybody help with this?

E.g. if we have:
Code:
backuplist = { '1/1/1', '2/2/2' }

save_values(backuplist)

grp.write('1/1/1', 52)
grp.write('2/2/2', false)

load_values(backup_list)

The group addresses will have different value types (boolean, percentage, int, etc.).

I'm not sure how to best implement the save_values() and load_values() functions - any ideas?
Thank you!
Morkov
Reply


Messages In This Thread
Backup/restore object values with storage.set/get? - by morkovka - 21.09.2021, 12:47

Forum Jump: