PV over production to switch on Pool pump

You can use my blueprint: https://community.home-assistant.io/t/pv-solar-excess-optimizer-auto-control-appliances-wallbox-dish-washer-heatpump-based-on-excess-solar-power/

The only thing it does not support at the moment, is a maximum duration. However, you can easily create a separate automation, which switches the automation based on my blueprint off as soon as your pool pump reaches the desired maximum duration.