Can I give visitors a (temporary) code so they can enter?

Yes, you can. Your cleaning lady, neighbour, babysitter,… This is useful for people who need to enter your house just once or at a particular time.