As I continue to explore the world of smart home automation, I’ve been experimenting with ways to optimize energy consumption while maintaining comfort. One area I’ve been focusing on is heating automation. I recently revisited a heating schedule blueprint I created last winter, which automates heating based on occupancy and time of day. The core logic works well: if the schedule is enabled, someone is home, and it’s within the designated weekday or weekend time window, the heating turns on. However, I wanted to add a boost function for those evenings when I want to ensure the house is warm regardless of the usual schedule.
Initially, adding the boost condition seemed straightforward, but it caused the entire logic to break. After some trial and error, I realized the issue was with how the conditions were nested. By restructuring the logic to prioritize the boost function first, I achieved the desired behavior. This experience reinforced the importance of carefully ordering conditions in automation logic.
Here’s the refined logic that works for me:
yaml
conditions:
- condition: state
entity_id: !input ‘schedule_enabled’
state: ‘on’ - condition: or
conditions:- condition: state
entity_id: !input ‘person1’
state: home - condition: state
entity_id: !input ‘person2’
state: home
- condition: state
- condition: or
conditions:- condition: time
before: !input ‘weekend_stop’
after: !input ‘weekend_start’
weekday: [sat, sun] - condition: time
before: !input ‘weekday_stop’
after: !input ‘weekday_start’
weekday: [mon, tue, wed, thu, fri]
- condition: time
- condition: state
entity_id: !input ‘boost_override’
state: ‘on’
This setup ensures that if the boost function is enabled, heating turns on regardless of other conditions. It’s a simple yet effective way to adapt the system to specific needs.
If anyone has tips on optimizing automation logic or energy-saving strategies, I’d love to hear them! Let’s continue to share knowledge and improve our smart home setups together.