Advanced house ventilation

Hi everyone,

I have a simple automation running which turns off my house ventilation when the temperature is below zero or above 25°C to either safe energy (in winter) and to keep the house cool in summer.

I am now thinking of how to take this automation to the next level. My idea is something like this.

At 00:00 HA checks the forecast of the day. If at any time the temperature forecast is outside the limit (0-25°C) I will get a notification at a certain time in the morning if I would like to activate the automation. If yes, the ventilation runs until the threshold is exceeded and shuts off.

However, I would like to have the house ventilated for two hours a day in any case, so if the forecast predicts that the ventialtion will be shut down for more than 22 hours, it should choose the best time frime (in winter when the temperature is the highest and in summer when the temperature is the lowest) and turn it on for two hours.

I have the openweathermap integration getting forecasts every three hours and the ventilation system is connected via a Plug-S.