Efficient Battery Charging Automation with Time Calculations

As a homeowner aiming to optimize my solar energy usage, I’ve been exploring ways to set up automated battery charging during off-peak hours. My goal is to have my battery charge between 06:30 and 07:00, which means I need to subtract 30 minutes from my target time of 07:00. While I can retrieve hours and minutes separately using state attributes, I’m curious about the best approach to handle this time subtraction and split the result into hours and minutes for my automation script. Should I use another helper or template sensor to manage the start time separately? I’m excited to find a streamlined solution that integrates seamlessly with my existing setup.