Should be easy enough if all you need to do is display the three states.
Create a template sensor with an icon template.
I can help you with this if you share the entity or entities and their actual states (from Developer Tools → States, not the translated states from a dashboard card).
As you can see, I already have a brightness sensor (also DIY). That one was super easy, I assume because Home Assistant knows, what a brightness sensor ist.
But adding my door sensor already gives me this error message:
Invalid config for [mqtt]: [state topic] is an invalid option for [mqtt]. Check: mqtt->mqtt->sensor->1->state topic. (See /config/configuration.yaml, line 17).
Please use proper formatting next time by putting it between three backticks. You missed the underscore in the last state_topic and used a space instead.
This really embarrasses me, please excuse me.
But it was really a bug in the linux geany editor (you can google it: “geany invisible underscore” or “geany underscore not displayed”).
I think I will now read a little bit about what a template sensor and an icon template is. Perhaps I will be able to figure it out by myself.
But I would prefer, if the sensor could always have the same door icon at the left side and shows its current state with the specific icon at the right side.
Like (for examples) a switch does.