diff --git a/README.md b/README.md index 27dbfa1..5a832bb 100644 --- a/README.md +++ b/README.md @@ -1,44 +1,88 @@ -# 🌡️ Smart Thermostat Controller Blueprint +#That is a solid, clean, and well-structured blueprint! Based on this final working version, here is the instructional Readme, focusing on setup and the automation's logic flow. -An intelligent Home Assistant automation that manages your heating based on multiple conditions for optimal comfort and energy efficiency. +*** + +# 🏡 Smart Thermostat Controller Blueprint + +**Author:** Andreas Gammelgaard Damsbo + +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 -### 🪟 Window/Door Detection -Automatically turns off heating when windows or doors are opened, preventing energy waste. Configurable delay to avoid false triggers. +* **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). -### 🌤️ Weather-Based Control -Monitors outdoor temperature and disables heating when it's warm enough outside. Includes adjustable winter mode threshold and delay settings. +--- -### 📅 Schedule-Based Temperature Control -Uses a schedule helper or calendar to set different temperatures for: -- **☀️ Day Mode** - Higher comfort temperature during active hours -- **🌙 Night Mode** - Lower temperature for sleeping or away periods +## ⚙️ Prerequisites & Setup -### 🏖️ Holiday/Away Mode -Integrates with a calendar to automatically reduce heating when you're away. Smart pre-heating starts before you return home (configurable offset). +Before using this blueprint, you must ensure the following helpers are set up in Home Assistant: -### 🔄 Multi-Thermostat Sync -Manual adjustment of any thermostat instantly syncs all others to the same temperature, giving you quick override control. +### 1. Required Helpers -### 🎯 Priority-Based Logic -1. Manual adjustments (highest priority) -2. Windows/doors open → heating OFF -3. Too warm outside → heating OFF -4. Away mode → reduced temperature -5. Day/night schedule → comfort temperatures +| 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. | -## 🛠️ Requirements +--- -- Window/door sensor(s) (binary_sensor) -- Outdoor temperature sensor -- Climate entity (thermostat) -- Schedule helper OR calendar for day/night timing -- Calendar for away/holiday periods +## 📝 Blueprint Configuration (Inputs) -## 📊 Smart Logging +When creating a new automation from this blueprint, you will be prompted for the following: -All mode changes are logged to your Home Assistant logbook for easy monitoring and debugging. +### 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