What I would like is to create is a “binary sensor” that checks the energy price, temperature forecast and maybe solar forecast
I use the Emhass addon for getting optimal times for heating from Nordpool electricity price, Solar forecast and historical power data EMHASS: An Energy Management for Home Assistant.
You can also adjust the heat pump temperature from temperature forecast Example configurations — emhass 0.7.8 documentation.