Message malformed: expected a dictionary for dictionary value @ data['action'][0]['target']

Hello,
First, thank you for Home Assistant and all the resources shared in order to learn and use this amazing project.

I’m using it to help farmers to automate some tasks as irrigation and green house door open/close driven by sensors and buttons.

Basically, things are simple and repeated multiple times. In order to avoid copy/past issue, I’m trying to use blueprint for the automation part.

So I’ve already configured automation manually, and I’m trying to convert it in blueprint. Here is my first automation example :

  - id: '1681155631416'
  alias: loadTimerPetiteSerre
  description: Démarrer le timer avec la liste des temps défini
  trigger:
  - platform: state
    entity_id:
    - input_select.ddpetiteserre
  condition:
  - condition: not
    conditions:
    - condition: state
      entity_id: input_select.ddpetiteserre
      state: 'OFF'
  action:
  - service: switch.turn_on
    data: {}
    target:
      entity_id: switch.irrigation_petite_serre
  - service: timer.start
    data:
      duration: 00:{{ states('input_select.ddpetiteserre') }}:00
    target:
      entity_id: timer.timerpetiteserre
  mode: single

It’s work and start a timer when a value is selected from an input_select.

Now the blueprint conversion :

blueprint:
  name: load timer
  description: Démarrer le timer avec la liste des temps défini
  domain: automation
  input:
    selectTime:
      name: select time
      selector:
        entity:
          domain: input_select
    switchEV:
      name: switch EV 
      selector:
        entity:
          domain: switch
    timerEV:
      name: timer EV
      selector:
        entity:
          domain: timer
      
mode: single
      
trigger:
  platform: state
  entity_id: !input selectTime
  
variables:
  inpSelectTime: !input selectTime
  timerDuration: "{{ states(inpSelectTime) }}"
    
condition:
  condition: not
  conditions:
    - condition: state
      entity_id: !input selectTime
      state: 'OFF'
      
action:
  - alias: "Allume l'electronvanne" 
    service: switch.turn_on
    target: !input switchEV
  - alias: "lance le timer" 
    service: timer.start
    data:
      duration: "00:{{ timeDuration }}:00"
    target: !input timerEV

The blueprint is available in the automation settings, so I try to use it but when I want to save it, I get the following error :

image

I can see the problem come from the data action parameter but I don’t understand what is the problem. I’ve also tryed to add data: {} for the first action but the issue persist.

Can you help me to understand it ?

Thank you for your support.

Seems like I have the same problem :frowning: In my case - I tried to use the existing Blueprint for IKEA Shortcut button, but I am unable add any actions - getting exactly same error message.

@gilou
Your issue is being caused by the fact that you are using entity selectors to define a target. You can either change to a Target selector and keep the actions as they are, or keep the entity selectors and modify your actions:

action:
  - alias: "Allume l'electronvanne" 
    service: switch.turn_on
    target: 
      entity_id:  !input switchEV
  - alias: "lance le timer" 
    service: timer.start
    data:
      duration: "00:{{ timeDuration }}:00"
    target: 
      entity_id: !input timerEV

@Kszys
Post the automation/blueprint you are using.

1 Like

@Didgeridrew I actually have the same issue as @Kszys. The blueprint I used (probably the same as Kszys used) is ZHA - IKEA Tradfri Shortcut button