Most of this functionality is now in the official smartlights feature. Have you had a chance to look at that yet? The “turn off after 20 minutes“ is in the “power allowance” option.
It’s true you can do just about anything you can think of with webcore, but that might be overkill for something this simple. So I would just start by looking at smart lights and see if it has what you need. It also has the advantage of being able to run locally, which webcore cannot.
You might also find the following FAQ of interest: