For 'x❌x' time in automation trigger is NOT a timer, is this by design?

I use the “for” time option in the automation triggers quite a lot in many automations. I have just now discovered that this is not actually a timer…

for example, i have an automation that checks if my fridge has been left open for too long:

triggers:
  - entity_id:
      - binary_sensor.fridgedoor_contact
    to: "on"
    for:
      minutes: 1
      seconds: 15
    trigger: state

i was under the impression that the FOR 1minute/15sec option would mean to trigger the automation after the binary sensor had switched to ON and stayed ON for the configured amount of time.
BUT if i open the fridge, and immediately close it again, and then after 1 minute and ten seconds open it again and leave it open for more than 5 seconds, and thus the 1,15 minutes passed of the original opening, it triggers the automation. So what the time setting actually does is check the state again after the initial 1,15 minute mark. it does not get reset after closing the door.

Is this by design or is this a bug?

And, how can i change my automatins to actually only trigger after the mentioned 1,15minutes have fully passed in ON state? or how to reset the automation after closing the fridge

It must be a bug introduced recently. The way it should work is as you expect, the state has to be continuously on for 1 minute 15 seconds for it to trigger.

If you can definitely repeat the behaviour you are seeing please write up an issue here (if there is not one already open):

EDIT: look at your contact sensor history, make sure it is definitely going off in between the two on times.