Save State on Switch device

Hey,
How can i save and load the state on a “Switch Device”, the switch is hooked up to a teleporter, and on entering, the switch turns on.
I tried several times with no luck.
Thanks for any advice!