Weather compensation heating automation

Just thinking aloud… re - HA Weather Compensation (instead of Load Compensation)

If you have a boiler that doesn’t do weather compensation, could this be achieved via HA automation using internet local weather reading + internal thermostat + boiler control?

I get that the boiler modulation won’t be perfect depending on boiler and thermostat control - but just thinking aloud.

thanks