Supports string syntax for "for"

It would be nice same syntax for “for” like synstax for “delay”.

On the below is actual error, if “for” is string.

“for” is same as “delay”, but (i don’t know) why “for” havn’t string syntax.

Docs:

alias: Toggle Kotel
sequence:
  - if:
      - condition: or
# ...
    then:
      - if:
          - condition: device
            type: is_off
            device_id: ac1e2c0c43cb7b066aff673346e88581
            domain: light
            for: "00:15:00"
        then:
          - type: turn_on
            device_id: ac1e2c0c43cb7b066aff673346e88581
            domain: light
        else:
          - delay: "00:15:01"
          - action: script.toggle_kotel
# ...

Message malformed: expected dict for dictionary value @ data[‘for’]

If you want help, write out your actual question. The forum population shouldn’t have to guess what you need help with.

Never post screenshots of code. Always copy-paste it as text, marking it up as code so indentation etc. does not get mangled.

It seems for does not support string notation but needs to specified with individual entries for hours/minutes/seconds.

for:
  minutes: 15

Thanks for fast response.

I know, that for “need” individual entries. But, why? Delay doesn’t.

This “issue” is feature request for add “string” supports for “for”.

Why? I want use “same” template for “for” and “delay”.

Docs:

for does support a time string, just not when used in a Device Trigger, Device Condition, or Device Action. Here’s an example of its use in the documentation for a State Trigger.

Device Triggers/Conditions/Actions also don’t support templates. They were designed to be composed exclusively via the Automation Editor in Visual mode and don’t support any modification to their YAML representations.