Script to run a set of actions

I have a script that i use to iterate through an array of actions calling each of them. i use this script with my actionable notifications in case i need to run several actions from one call. It was working fine, but has stopped working due to a recent upgrade. this is the script:

alias: HELPER - Unified Comms - Run actions
sequence:
  - repeat:
      for_each: "{{ actions }}"
      sequence:
        - target: "{{ repeat.item.target }}"
          data: "{{ repeat.item.data }}"
          action: "{{ repeat.item.service }}"
description: >-
  Helper to parse through a list of actions and execute them.  Used in unified
  comms to parse actions
fields:
  actions:
    name: ⌛️ The Action(s)
    description: Actions to loop through
    selector:
      action: {}
mode: queued
max: 40

The list of actions looks like this:

  - action: light.turn_off
    metadata: {}
    data: {}
    target:
      entity_id: light.living_room_triple_lamp
  - action: light.turn_off
    metadata: {}
    data: {}
    target:
      entity_id: light.living_room_triple_lamp

it now shows an error in the script configurator that says: Error in describing action: cannot use 'in' operator to search for "area_id" in "{{ repeat.item.t..

Not sure what exactly changed, but if anyone has any ideas, i am all ears!

Double check if that should be repeat.item.action

1 Like

d’oh, that was totally it!

1 Like