Wait for trigger continues execution after timeout, when it actually shouldn't

Hi folks, anyone having these issues lately?

wait_for_trigger:
  - trigger: state
    entity_id:
      - binary_sensor.motion_sensor
    to:
      - 'on'
    from:
      - 'off'
timeout:
  hours: 0
  minutes: 20
  seconds: 0
  milliseconds: 0

This is the step in my automation, and I know that by default execution stops if the timeout reaches 0, even though it's not defined in yaml:

For some reason this is not the case as of lately, and I'm seeing automations fall through and actually continue.

Any ideas what I'm missing? I just toggled continue on timeout on and off, so it gets manually defined in yaml, so I'll see if it happens again, but just a weird bug overall

It is better to share some traces to go deepe on this

I would, but I don't have any from when the automation failed. The 5 trace limit is just killing all debug potential.

If you don't want it to continue on timeout you have to add:

continue_on_timeout: false

This has always been required. See: Script syntax - Home Assistant

Huh, so you're saying continue on timeout is true by default, but the UI shows it as false by default?

I use YAML, not the UI editor but yes that looks like a bug with the editor.

The YAML generated does not show the required option. To prove it what YAML does the editor generate when the switch is on?

it does show as continue_on_timeout: true

when the switch is on.

Turning the switch off clears the whole thing from the yaml instead of setting it to false.

So there is some sort of discrepancy between the default logic and the UI logic.

It's a bug with the editor. It is not generating the correct yaml when the switch is off. It should add:

continue_on_timeout: false

Probably because whoever wrote it thought false was the default. It's not. true is.

You need to report this here:

Give as much information as you can. Include examples and the link to the documentation I shared above. Do not just link to this topic.

tom_l is correct, code is expecting to have FALSE in the YAML, or else, moves forward as if it is TRUE.

Nice find.

Double linking here for visibility: Wait for trigger UI bug: continue on timeout does not reflect actual HA Logic · Issue #173881 · home-assistant/core · GitHub