No description
Find a file
2025-12-05 12:39:25 +01:00
ha-smart-thermostat-control.yaml Update ha-smart-thermostat-control.yaml 2025-12-05 12:34:28 +01:00
LICENSE Initial commit 2025-12-04 10:12:17 +01:00
README.md Update README.md 2025-12-05 12:39:25 +01:00

🏡 Home Assistant Smart Thermostat Controller Blueprint

This Home Assistant blueprint provides advanced control over your smart thermostats, combining schedule-based heating with external factors like outside temperature (Winter Mode), window/door states, and calendar-based Away/Holiday modes. This version is designed for flexibility, using an Input Number Helper to control the day temperature dynamically.


Features

  • Schedule Control: Sets Day or Night temperature based on a Schedule Helper entity.
  • Dynamic Day Temp: Uses an Input Number Helper for Day Temperature, allowing easy adjustments via the UI.
  • Winter Mode: Heating is disabled entirely if the Outdoor Temperature remains above a defined threshold.
  • Window/Door Safety: Turns off heating instantly if any selected window or door sensor is open for a defined duration.
  • Away/Holiday Mode: Uses a Calendar Entity to set a lower Away temperature when you are traveling.
  • Pre-Return Heating: Starts heating up before your scheduled return time (using a negative offset).

⚙️ Prerequisites & Setup

Before using this blueprint, you must ensure the following helpers are set up in Home Assistant:

1. Required Helpers

Helper Type Purpose Setup Notes
Schedule Helper Defines the time slots for Day (On) and Night (Off) heating. Go to Settings > Devices & Services > Helpers > Add Helper > Schedule.
Input Number Helper Stores the value for the Day Time Temperature Target. Go to Settings > Devices & Services > Helpers > Add Helper > Number. Set min/max values to match your thermostat range (e.g., 10 to 30).
Outdoor Temperature Sensor Entity to read the current outside temperature (required for Winter Mode). This is usually provided by your weather integration.
Window/Door Sensor Group Entity or group of entities that are on when open. Multiple sensors can be selected directly in the blueprint, or you can create a Group helper first.
Away Calendar Entity Used for Holiday or extended Away periods (e.g., Google Calendar, iCal). This entity must report on when an event is active.

📝 Blueprint Configuration (Inputs)

When creating a new automation from this blueprint, you will be prompted for the following:

Core Entities

Input Description
Thermostat Select all climate entities you want this automation to control (can be multiple).
Schedule Helper The schedule helper defining day/night times.
Day Time Temperature Input Number The input_number helper that controls the target temperature during scheduled Day hours.
Night Time Temperature Target Static temperature target for scheduled Night hours.
Away Temperature Target Static temperature target for when the Away Calendar is active.

Winter Mode Logic

Input Description
Outdoor Temperature Sensor The sensor providing the current outdoor temperature.
Winter Mode Threshold If the outdoor temperature is below this value, heating is enabled. (Default: 16°C).
Winter Mode Delay Time the outdoor temp must stay above the threshold before heating is turned OFF. (Default: 30 minutes).

Window/Door Logic

Input Description
Window / Door Sensor Group Select one or more binary_sensor entities. Heating stops if any are open.
Window / Door Sensor Delay Time a window must be open before the automation turns heating OFF. (Default: 5 seconds).

Away Mode Logic

Input Description
Holiday or Away Calendar The calendar entity indicating away/holiday status (on when active).
Return Offset Time before the calendar event ends to start heating. Use a negative value (e.g., -120 minutes starts heating 2 hours before you return).

🧠 Automation Logic Flow

The automation uses a priority-based choose block to determine the required heating action. It executes the action for the first condition that is met.

Priority Condition Check Resulting Action
1 Window/Door Open? OFF - Turn heating off immediately.
2 Too Warm Outside? OFF - Turn heating off if the outdoor temp is above the Winter Mode threshold.
3 Away/Holiday Active? Away Temp - Set target to the static Away Temperature. (Requires Winter Mode active and windows closed).
4 Day Time Active? Day Temp - Set target to the value from the Input Number Helper. (Requires Winter Mode active and windows closed).
5 Night Time Active? Night Temp - Set target to the static Night Temperature. (Requires Winter Mode active and windows closed).
Default (No high-priority conditions met) OFF - Turn heating off (e.g., if the schedule is inactive but Winter Mode is not met).

Acknowledgement and background

I tried different Home Assistant add-ons and integrations, but wasn't really satisfied in controlling room temperature in our house. The heating is based on central heating and radiators with different Zigbee-based termostats.

This blueprint for HA was initially inspired by ha-smarter-thermostat by muratcesmecioglu, but deviated through extending to also include an away calendar and a manual overwrite mode to allow manual inputs on the thermostats. Logic coding was assisted by claude.ai.