Trigger using history values

I’m trying to create a “laundry wash end” notification based on used power.
I created a 5 min average sensor that smooths power peaks and I set an automation trigger that triggers when average power is below a certain value.
Everthing works fine except when I postpone the start of the washing machine because in that “waiting time” the trigger is triggered.
I’d like to add a second condition to test if 10 minutes in the past the average power was higher of a certain value.
Which is the way to get and check values of a sensor in the historical data?