Using Calendar for Heating Automation: A Simple Solution

Hey everyone, I wanted to share my experience with setting up a heating automation using a calendar-based approach. My goal was to allow my wife to easily activate the heating without needing to dive into complex configurations. Here’s how I approached it:

I initially looked into using the Local Calendar integration in Home Assistant, but it didn’t quite fit my needs since it couldn’t update entities directly. After some research, I stumbled upon a more straightforward solution using custom templates and sensor.sun_next_rising properties. This allowed me to create a dynamic schedule that adapts to sunrise and sunset times.

Here’s a quick breakdown of what I did:

  1. Defined Offsets: I set up sunrise and sunset offsets to ensure the heating activates at the right time. For example, the heating turns on 30 minutes before sunrise and stays on until 20 minutes before sunset.
  2. Macro Creation: I created a macro in my mytod.jinja file to handle the timing logic. This made it easy to adjust the schedule without rewriting the entire automation.
  3. User-Friendly Adjustments: I linked the offsets to number helpers in the UI. This way, my wife can tweak the timings herself without needing technical knowledge.

The best part? This setup not only works seamlessly but also integrates beautifully with the Energy Dashboard. It’s been a game-changer for our morning routine, ensuring the house is warm and cozy when we wake up.

If anyone has questions or suggestions on improving this setup, I’d love to hear them! :hugs: