After updating a helper schedule, I want to calculate the total time the schedule helper will have the boiler running for the upcoming week. My goal is to project the boiler’s operational hours to estimate energy consumption and workload in advance. This way, I can know beforehand how much time the boiler will be active during the week and accurately calculate the associated costs. I prefer not to rely on statistics from past usage, as I want to make these estimations before the actual usage occurs.
Does anyone know a simple way to achieve this?
I don’t think there is a simple way. The only available data (attribute) the schedule helper provides is the date and time of the next event (on or off). Nothing after that.
Is there a ‘complicated’ way?
Parsing the config/.storage/schedule
file with a python script perhaps.
Thank you! I’ve successfully implemented the solution by following these steps:
- Copy the Schedule File to the
www
Directory
I set up a process to copy the schedule file to thewww
directory at regular intervals (e.g., every few minutes). - Create a REST Sensor to Load the JSON Schedule
I configured a REST sensor in Home Assistant to fetch and load the JSON schedule from the copied file. - Create a Template Sensor to Aggregate the Required Schedule Data
I developed a Template sensor that sums up the necessary parts of the schedule, allowing me to calculate the total active time.
This setup enables me to monitor how long the schedule is active. While these steps, along with the limited capabilities of the schedule helper, are not instantaneous, they effectively provide the functionality I need.