turn humidity fan on longer when manually activated vs PL scheduled

I’m having issues with a PL condition. I have a condition that automatically turns on the washroom fan for 10 minutes, with 20 minutes in-between. However, I want to add a condition that will keep the fan on longer (i.e. 25 mins) if I manually turn on the fan. I don’t think I have that condition setup properly. My PL setup is below. I think the condition for “manual_fan” needs to be adjusted. Basically, I think it has to be: assume that the fan was turned on manually if the fan was turned on less than 20 minutes from the last time it was turned on. manual_fan (washroomFanOff; NOW<20:00) AND washroomFanOn

Does the condition above make sense? How should I set this up?

Triggers
Name Description
isDaytime Day or Night indicates Day time.
isNightTime Day or Night indicates Night time.
washroomFanOn Washroom Fan is turned on
washroomFanOff Washroom Fan is turned off
HumidInside Humidity reported by Nest goes above 40
HumidOutside Humidity reported by Humidity go above 70
HotInside Nest ambient temperature goes above 25 degrees

Conditions
Name Expression
AutoOffWashroomFan (07:00:00; NOW; 21:00:00) AND (washroomFanOn; NOW>10:00) AND (NOT manual_fan)
AutoOnWashroom (07:00:00; NOW; 21:00:00) AND (washroomFanOff; NOW>20:00) AND (HumidInside OR HumidOutside OR HotInside)
manual_fan (washroomFanOff; NOW<20:00) AND washroomFanOn
manual_fan_off (manual_fan) AND (washroomFanOn; NOW>20:00)

Actions
Actions for Condition: AutoOffWashroomFan
Device Action Arguments
Washroom Fan SetTarget newTargetValue=0

Actions for Condition: AutoOnWashroom
Device Action Arguments
Washroom Fan SetTarget newTargetValue=1

Actions for Condition: manual_fan_off
Device Action Arguments
Washroom Fan SetTarget newTargetValue=0