My journey for EV charging might be useful here.
Level 1. Fixed time window charging 1000-1400 over solar soak window. Set EV charging rate fixed to 50% of max PV production, to allow for other household loads.
Level 2. Measure excess PV production and set EV charging rate to match, updated every minute. Optimizing use of unused Solar Power to charge a Tesla - #12 by markpurcell
Level 3. Sort the list of 30 minute price forecasts to find the relevant price for the cheapest fixed 2 hours daily (e.g. Car Charging) or 8 hours (e.g. Pool Pump). These 30 minute forecasts change during the day and this method constantly recalculates for the optimal solution.
Level 4.Based on EV/ Battery State of Charge/ Pool Temp difference and known charging rate determine how long (30 blocks) needs to be charged and then identify the relevant price. I.E. Lots of charging at low SOC and limited charging windows at high SOC.These 30 minute forecasts change during the day and this method constantly recalculates for the optimal solution.