Blueprint Trigger input not working

No matter what I do, my blueprint that I’ve got an input selector that takes a trigger, keeps complaining that something with triggers is malformed when I try to create an automation.

Message malformed: expected a dictionary @ data['triggers'][0]

Something of this sort. I can’t for the life of me figure out what the correct syntax is here, can anyone help? My current Blueprint is this:

blueprint:
  name: Area Light Toggle
  description: Toggle lights in an area on or off
  domain: automation
  input:
    selected_remote_button:
      name: Trigger Source
      description: The name of the trigger to be used, e.g. a button on a remote
      selector:
        trigger:
    selected_area:
      name: Area
      description: The area where the lights will be toggled
      selector:
        area:

# Is there some thing wrong here? I tried this, i tried triggers: !input selected_remote_button
# I tried triggers: - triggers: !input, i tried with entity_id, what's it supposed to be???
triggers:
  - !input selected_remote_button

alias: Area Light Toggle
description: ""

variables:
  selected_area_var: !input selected_area
conditions: []

actions:
 /// actions ///

mode: single

EDIT: I’ve removed the original content of this post because the other posts have made me realize it was not correct.

Hello hup,

That isn’t formatted correctly. See: Selectors - Home Assistant

You basically have to write the trigger as part of the selector. See the examples.

I’m not sure what you mean by writing the trigger as part of the selector. If I put triggers at the same level as input it says properly not allowed. if I do

triggers:
  - triggers: !input ...

I get the same message malformed error. The documentation hasn’t cleared it up for me, already have tried to follow it unfortunately.

triggers: !input selected_remote_button should be correct.

If that doesn’t work, please give the exact error.

2 Likes

according to the docs there are no options so it only has its key -

Same error

Message malformed: expected a dictionary @ data['triggers'][0]

You are correctly reading the docs on this point. I’ve removed my earlier post, and I apologize if it set you back. I think the other posts made after mine are likely to be a lot more helpful to you.

You have that in the input, and no default. So what exactly have you added as your input?

It needs to be a fully formed list of triggers. The example is:

Example trigger selector output result

- trigger: numeric_state
  entity_id: "sensor.outside_temperature"
  below: 20

OR you need to have something formatted like that as the default.

2 Likes

Thanks for the help so far, now I’ve noticed the blueprint isn’t updating after my edits for some reason, so I’ve been testing the same blueprint over and over…

Developer Tools → YAML lets you reload parts of your configuration or to restart HA altogether.

1 Like

Oh I want to punch something so bad right now. I’ve been racking my brain over this for the past six hours, and I had it right in the beginning…

Well good to know I need to reload yaml configuration for blueprints to get updated I guess.

Thanks yall, problem solved :smiling_face_with_tear::smiling_face_with_tear::smiling_face_with_tear:

If you are using code server to edit, you can use the F1 key or the Command Pallet via the right click menu to bring up the homeassistant commands. those include all the reloads and restarts that are in that developer tools menu or the ‘c’ context menu from within the dashboard.

1 Like