Switching on heat pump based on Forecast solar

Hello,
i have my heat pump connected so a small solar system.
I can turn on the heat pump with a Shelly 1. Is it possible to turn the Shelly for 3 hours, that deliver the most energy, that are between 10am and 4pm?
Like in the example i want to turn on the heat pump between 1pm and 4pm.

If it is always 1-4pm just use time triggers.

On automation trigger:

trigger:
  platform: time
  at: '13:00:00'

Off automation trigger:

trigger:
  platform: time
  at: '16:00:00'

No, i want to turn it on for 3 hours which the most energy is produced.
When its raining afternoon, these 3 hours are earlier than when its sunny the whole day.

Like when the output on the forecast looks like the blue line, i want to turn it on, on the green line.

What attributes does your solar forecast sensor have?

The damping factor is not right yet, i’m tweaking that right now.

Look in Developer tools / States for the sensor attributes.

Click → Open your Home Assistant instance and show your state developer tools.

According to the docs Forecast.Solar - Home Assistant

Forecast Solar tells you the expected time of peak energy:

Subtract 1.5 hours from that and start your heat pump at that time. Turn it off at that time plus 1.5 hours.

These are all my sensors:

The problem is, that i dont get any solar production after 4pm.
Another problem is, that the 3 hours with the most production are not always in a row.

My idea was to make a loop that goes through all the predicted values that are shown in the forcast graph and pick the hightest ones between 10am and 4pm.

But how do i get these values?

Ok now you are moving the goalposts. I cant help you with that.

I mean, the data is there, as homeassistant can create that graph.
I only have to analyse the data of the graph but i dont know, how to access that.

Check the attributes of sensor.power_production_next_12_hours

Its only an estimation of the produced power 12 hours ahead

In your picture you can see that there are three sensors at the bottom of the list which are disabled.

If you enable them you will get the data flowing in to HA.

Had the same issue when I started using this integration two days ago :slight_smile: