Hello everyone! I’m currently working on setting up an automation system in my home, and I’d love to share my experience and ask for some advice. The goal is to automate my HVAC system to turn off when doors or windows are left open for an extended period, especially when the outdoor temperature is extreme. This would help save energy and prevent unnecessary heating or cooling losses.
My Setup
I have a security system with door and window contacts connected to Home Assistant (HA) via an integration. The thermostat is integrated through an American Standard/Trane system, and I also have a local weather station reporting outdoor temperature data to HA. I’ve successfully set up a similar automation based on phone location, but this one is a bit different, so I need some guidance.
What I Want to Achieve
- Condition Check: If any door or window remains open for more than 10 minutes, and the outdoor temperature is below +13°C or above +24°C, I want the HVAC to turn off and send a warning notification.
- Partial Automation: If the outdoor temperature is within the comfortable range (+13°C to +24°C), I still want a warning message if a window or door is open for more than 10 minutes, but without turning off the HVAC.
Questions and Challenges
- Grouping Sensors: I have about 20 door and window contacts. Should I group them into one condition to simplify the automation logic? For example, if any contact is open, trigger the condition.
- Thermostat Integration: The thermostat provides system status (e.g., cooling, heating) and mode (e.g., heat, cool, off). I need to ensure the automation correctly interacts with these states. Specifically, how do I check the current mode and turn it off if necessary?
- Time Delay: Implementing a 10-minute delay before triggering the automation. This is crucial to avoid false positives when someone briefly opens a door or window.
- Temperature Conditions: Incorporating both lower and upper temperature thresholds into the automation logic.
What I’ve Tried So Far
I’ve started drafting a YAML configuration but am unsure about the correct syntax and logic flow. I also need to ensure that the automation doesn’t interfere with other systems or cause unintended behavior.
Seeking Your Expertise
If anyone has experience with similar automations or can provide insights into the best approach, I’d greatly appreciate it! I’m also happy to share my current YAML setup once I get some direction.
Thanks in advance for your help and suggestions!