ESPHome: custom time-based cover with open-window protection (Shelly 2.5)

Occasionally I made the mistake of lowering the screen when the window was open. To prevent this, I made a custom time-based cover that uses a reed switch to prevent the screen from lowering when the window is open.

You can find the code and instructions on Github:

Hope it can help you!