Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script repeat action not defining repeat variable in while or until conditions #38117

Closed
pnbruckner opened this issue Jul 23, 2020 · 1 comment · Fixed by #38124
Closed

Script repeat action not defining repeat variable in while or until conditions #38117

pnbruckner opened this issue Jul 23, 2020 · 1 comment · Fixed by #38124
Assignees
Labels

Comments

@pnbruckner
Copy link
Contributor

pnbruckner commented Jul 23, 2020

The problem

For "repeat while" and "repeat until" script actions, the repeat variable is not defined while evaluating the while/until condtions.

Environment

  • Home Assistant Core release with the issue: 0.113
  • Last working Home Assistant Core release (if known): N/A (new in 0.113)
  • Operating environment (OS/Container/Supervised/Core):
  • Integration causing this issue: script & automation
  • Link to integration documentation on our website:

Problem-relevant configuration.yaml

script:
  my_script:
    sequence:
      repeat:
        while:
          - condition: template
            value_template: "{{ repeat.index < 10 }}"
          - # some other condition
        sequence:
          - ...

Additional information

Noted in this community forum post.

@pnbruckner pnbruckner self-assigned this Jul 23, 2020
@pnbruckner pnbruckner added the bug label Jul 23, 2020
@pnbruckner pnbruckner changed the title Script repeat while action not setting repeat variable for first loop Script repeat action not defining repeat variable in while or until conditions Jul 23, 2020
@pnbruckner
Copy link
Contributor Author

Title & description changed to reflect the fact that it wasn't working for "repeat until" actions either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant