Script service data_template array based on input_boolean

I think I’ve now solved it with using:

input_boolean.vacuum_can_clean_catarea:
  cleaning_zone: [24150,24707,25221,123]

input_boolean.vacuum_can_clean_bedroom1:
  cleaning_zone: [23950,25336,26264,23121]

and

service: xiaomi_miio.vacuum_clean_zone
target:
  entity_id: vacuum.rockrobo_vacuum_v1
data:
  repeats: 1
  zone: |
      {{ expand('group.vacuum_zones') | selectattr('state', 'eq', 'on')
       | map(attribute='attributes.cleaning_zone') | list }}