MRI Hooks: remember previous state, programmatically construct pin lists from TemperatureControl, StepperMotor and Switch