How to create input value pairs?

I would like to create a blueprint that makes it possible to irrigate multiple zones using ESPHome. Each zone has a sensor that dictates how long the zone should be watered, a zone ID and a valve ID. My problem is to capture these zones with an input selector, such as:

Sensor 1, Zone 1, Valve 1
Sensor j, zone k, valve l
Sensor x, zone y, valve z

How can I capture these value pairs with an input selector that I can then loop over like:

      - repeat:
          for_each:
            - sensor: sensor.lawn_main_deck_sensors
              vid: 0
              zid: 1
            - sensor: sensor.lawn_tree
              vid: 1
              zid: 2
            - sensor: sensor.lawn_office
              vid: 2
              zid: 3
            - sensor: sensor.herbs
              vid: 3
              zid: 4
            - sensor: sensor.greenhouse
              vid: 4
              zid: 5
            - sensor: sensor.side_house
              vid: 5
              zid: 6
 

I get that you want to build a blueprint. That’s great, but you really need to follow the HA rec and build your logic first as an automation, then convert it to a BP. You will have a much better chance of success.

As far as your specific question the blueprint part of this site is not a goot fit, you may want to remove the blueprint tag and just ask in the configuration topic area. You will get mor eyes on your question.

I have the complete automation. But this part of grouping entities in input selector is the problem I have.

alias: ESPHome Smart Irrigation
description: ""
trigger:
  - platform: event
    event_type: smart_irrigation_start_irrigation_all_zones
condition:
  - condition: state
    entity_id: input_boolean.irrigation_enabled
    state: "on"
action:
  - if:
      - condition: template
        value_template: >-
          {{states('input_number.number_of_days_since_last_irrigation')<states('input_number.irrigate_every')}}
    then:
      - service: input_number.increment
        data: {}
        target:
          entity_id: input_number.number_of_days_since_last_irrigation
    else:
      - repeat:
          for_each:
            - sensor: sensor.lawn_main_deck_sensors
              vid: 0
              zid: 1
            - sensor: sensor.lawn_tree
              vid: 1
              zid: 2
            - sensor: sensor.lawn_office
              vid: 2
              zid: 3
            - sensor: sensor.herbs
              vid: 3
              zid: 4
            - sensor: sensor.greenhouse
              vid: 4
              zid: 5
            - sensor: sensor.side_house
              vid: 5
              zid: 6
          sequence:
            - if:
                - condition: template
                  value_template: >-
                    {{state_attr(repeat.item.sensor,'State')=='disabled' or
                    states(repeat.item.sensor)|int()==0}}
              then:
                - service: switch.turn_off
                  target:
                    entity_id: >-
                      {{'switch.sprinklercontroller_enable_zone_'+repeat.item.zid|string()}}
                  data: {}
              else:
                - service: switch.turn_on
                  target:
                    entity_id: >-
                      {{'switch.sprinklercontroller_enable_zone_'+repeat.item.zid|string()}}
                  data: {}
                - service: esphome.sprinklercontroller_set_valve_run_duration
                  data:
                    duration: "{{states(repeat.item.sensor)}}"
                    valve: "{{repeat.item.vid}}"
      - service: esphome.sprinklercontroller_start_full_cycle
        data: {}
      - service: smart_irrigation.reset_all_buckets
        data: {}
      - service: input_number.set_value
        data:
          value: 0
        target:
          entity_id: input_number.number_of_days_since_last_irrigation
mode: single

You are asking a list manipulation question in a blueprint forum, I’m not ignoring you, I just don’t have an answer. Maybe the right person will see it here, maybe not.

I am asking how to get a array list into a blueprint.

I have no idea how it works, but like this.
If you figure it out, post back here and let us know. I see that the only other thread about it is also unresolved. Perhaps ask there as well.

The object selector sounds promising. Unfortunately the property multiple isn’t allowed.