Hello,
A long time ago I programmed a PID controller in appdeamon and used it to heat the house. I even added the outside temperature as a disturbance and it worked quite well. Anyway I digress, before coming to HA I used Jeedom, and they had a “smart” thermostat that learned how the room was heated, how the outside temp influenced the internal temp ect. Jeedom would then compute a PWM signal to control the heating (on for x mins during y mins) https://jeedom.github.io/plugin-thermostat/fr_FR/ . Turns out this was an app for a Vera smart house controller. The algorithm has been ported to Domoticz in python and can be found here : https://github.com/999LV/SmartVirtualThermostat.
Looks like it is what you peeps are looking for?! I’ll post the link as a request for integration into HA thermostat.
Cheers,
Matthew