made sensor save its state