I’ve been on a journey to automate my home, and one of my latest projects has been controlling my water heater. Let me share my experience in case it helps anyone else!After setting up a scheduled automation to turn on my water heater at a specific time, I wanted the convenience of having it automatically turn off after a set delay. I used an input_datetime to schedule the on time and an input_select for the user to choose the delay duration. However, getting it to turn off proved tricky.Initially, my automation didn’t work as expected. The heater would turn on at the correct time, but the turn-off part simply wouldn’t trigger. I spent hours reviewing my configuration, checking logs, and researching similar setups. It was frustrating, but also a great learning opportunity!After some trial and error, I realized the issue was with how I was calculating the turn-off time. I needed to ensure the delay was correctly applied relative to the on time. I adjusted my trigger to use a more precise calculation and simplified the logic to avoid any potential timing errors.The solution involved using a template trigger that calculates the exact time to turn off based on the selected delay. I also made sure to test different scenarios to confirm it was reliable. Now, everything works smoothly—my water heater turns on at the scheduled time and off exactly when I want it to, without any manual intervention.This project taught me the importance of carefully reviewing time calculations and testing each part of an automation. It’s also a reminder that even when things don’t work at first, persistence and a bit of troubleshooting can lead to success!If anyone has tips or alternative approaches for automating water heaters, I’d love to hear them. Happy automating everyone! ![]()