Restore items state when someone arrive

Hi,

I have group “allLights”.

And I have rule like “when door changed from open to closed (I’m going out) then turn off all lights” It is working greate.

Now I want to crreate rule like:
when door changed from closed to open (I’m comeback to home) then restore all states “allLights” from state “after I’m go out”.

Can I “save state” from group? And restore them?

See storeStates and restoreStates: https://www.openhab.org/docs/configuration/actions.html#event-bus-actions