"for:" in state condition could accept input_number entity ID

Two things that seems similar to me :

The first one works :

  action:
    - delay: "00:{{ states('input_number.interval') | int }}:00"

The second one doesn’t work :

    - condition: state
      entity_id: binary_sensor.XXXXX
      state: "off"
      for: "00:{{ states('input_number.interval') | int }}:00"

This could be useful to enable a little more interactivity in fine tuning of automation without having to return changing yaml config file.

15 posts were merged into an existing topic: For-statement for automation with numeric state