Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 103326

Script repeat for each problem

$
0
0

Hi, maybe someone can help me with this script:

repeat:
  for_each:
    - raum: rollo_automation_buero
      rollo: 1493491a1ba0c1dd478f7a5d2b7fba99
  sequence:
    - if:
        - condition: state
          state: 'on'
          entity_id: "input_boolean.rollo_automation_buero"
      then:
        - service: homematicip_local.set_device_value
          data:
            channel: 7
            parameter: COMBINED_PARAMETER
            value: WPTCLS=1,WPTCL=2
            device_id: '{{repeat.item.rollo}}'
      else:
        - service: homematicip_local.set_device_value
          data:
            device_id: '{{repeat.item.rollo}}'
            channel: 7
            parameter: COMBINED_PARAMETER
            value: WPTCLS=1,WPTCL=0

This version works perfectly
, however when I try to use a repeat.item for the entity I’d in the if condition I even can’t save the script.


repeat:
  for_each:
    - raum: rollo_automation_buero
      rollo: 1493491a1ba0c1dd478f7a5d2b7fba99
  sequence:
    - if:
        - condition: state
          state: 'on'
          entity_id: "input_boolean.{{repeat.item.raum}}"
      then:
        - service: homematicip_local.set_device_value
          data:
            channel: 7
            parameter: COMBINED_PARAMETER
            value: WPTCLS=1,WPTCL=2
            device_id: '{{repeat.item.rollo}}'
      else:
        - service: homematicip_local.set_device_value
          data:
            device_id: '{{repeat.item.rollo}}'
            channel: 7
            parameter: COMBINED_PARAMETER
            value: WPTCLS=1,WPTCL=0

Anyone an idea?

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 103326

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>