switch: set wantedstate initially to the current state