I have a fresh air intake on my house that I would like to turn on and off using HA. I have created a separate script that downloads the forecast and finds the best times to open / close the intake based on outdoor temperature (for now). Since this script runs daily I would like it to send the open/close times to HA and have HA take care of opening and closing the intake. Is there a way to send such scheduling commands to HA core either through the REST API or other APIs?
Alternatively - if there is a way to send a turn on/off command that could work also - then I would just need to make another script that would run in the background and send these on/off commands at my specified timepoints. (not as elegant of a solution).
Here is the output of the script - green is time to turn on redline is time to turn off: