Thank you for the feedback. I worked with ent_for_name right now but it was wrong.
I changed it and assigned the action to the model.
One small question though, how could I make it easier for myself to use multiple doors controlled by keypads. I don't want to create a function for each model of course.