Skip to content

repeat for_each "Incorrect type. Expected "string"." #3344

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

Open
derjoerg opened this issue Jan 3, 2025 · 0 comments
Open

repeat for_each "Incorrect type. Expected "string"." #3344

derjoerg opened this issue Jan 3, 2025 · 0 comments
Labels

Comments

@derjoerg
Copy link

derjoerg commented Jan 3, 2025

vscode_incorrect-type-string

- id: sun_protection
  alias: 16 Sonnenschutz
  description: ''
  trigger:
  - trigger: state
    entity_id:
    - input_button.sonnenschutz
  condition: []
  action:
  - repeat:
      for_each:
      - window: binary_sensor.raum_1_rechts_raum_1
        cover: cover.zimmer_1_rechts
        message: im Gästezimmer
        position: 0
      - window: binary_sensor.raum_1_links_raum_1
        cover: cover.zimmer_1_links
        message: im Gästezimmer
        position: 0
      - window: binary_sensor.kuche_kuche
        cover: cover.kuche
        message: in der Küche oben
        position: 0
      - window: binary_sensor.raum_2_links_raum_2
        cover: cover.zimmer_2
        message: im Nähzimmer
        position: 0
      - window: binary_sensor.bad_bad_2
        cover: cover.bad
        message: im Bad oben
        position: 25
      sequence:
      - if:
        - condition: template
          value_template: '{{ is_state(repeat.item.window, ''off'') }}'

It is also shown like this in the documentation https://www.home-assistant.io/docs/scripts/#for-each

@derjoerg derjoerg added the yaml label Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant