Smart climate control

I currently have several dumb climate control systems through home assistant.
If it gets to cold → turn the heating on
If it gets to hot turn → the heating off
Doing it this way the temperature fluctuates between 21.5 and 20.5.

I’m looking for a way to make the climate control smarter.
The system should be able to learn how much heat it needs to give to get a certain temperature.
So if the outside temp is 10°C the heating should be on 5min every 15min or so.
So instead of acting on feedback, it uses the feedback to learn and the ‘smart climate’ entity would be able to keep the temperature on a certain level…
Maybe even have the option of having several heating sources, and controlling them to turn them all on the heat the room, and the system should cycle through the different heating sources to keep the room on a certain temperature…

And it would be nice if the control was smart enough to know when to start heating.
Now I want 21° at 8:30, so the dumb control is set to starts heating at 7:30.
A smart control would know when to start heating to achieve 21 at 8:30…

How could this be done in a home assistant environment?

Not a solution to all your questions but at least regarding the fluctuation it seems what you need is a PID controller.

There are custom integrations for PID climate controllers like this or this.