If you want to solve for multiple loads and variable pricing the EMHASS add-on: An energy management optimization add-on for Home Assistant OS and supervised is one of the best methods to optimise.
Here is my plan for today; Amber, solar, pool, EV, hot water and aircon: