Preheat feature based on calendar entries

Hi there,

I’m quite new to Home Assistant and would like to set up an automation or whatever to perform a pre-heat feature based on calendar entries. Could you please provide some initial ideas to get me started?

I’m currently using the awesome ICS Calendar plugin to import an O365 calendar, which works great. I’ve already created some automations that trigger the heating 2 hours before a calendar event begins. However, I’d like to develop a more sophisticated approach that considers both the outside and inside temperatures and determines the pre-heat time accordingly.

My idea is to use a template to calculate a target temperature and switch on the heating if it falls below the actual temperature. This calculation would take into account both the outside and inside temperatures, as well as some heating and cooling curves.

While the mathematical calculations aren’t the issue, I’m more unsure about which feature to use to achieve this goal. Automation, blueprints, templates, scripts, or helpers? How would you combine these features to implement my idea?

I’ve created a graphic to illustrate my plan:

The colored lines show the target temperate… so far so obvious… :slight_smile:

Thanks a lot for your help!