It appears to be generating a float value and delay won’t accept that. I assume you are using this template with seconds: ( or minutes: ) and not directly with delay:
BTW, range(5, 25) returns a value between 5 and 24, not 5 and 25. If you really want the upper end to be 25, then you need to specify 26 as the second value: