Optional multiple inputs in blueprints

Hi together,

I specified an optional multiple input like this:

window_entities:
  name: "Sensor"
  description: "Sensor which triggers the notification."
  default: []
  selector:
    entity:
      domain: binary_sensor
      multiple: true

When using the input in a condition like this and leave the input empty, the condition is true. I expected the condition to be false:

condition: state
entity_id: !input window_entities
state: 'on'

When declaring a variable with the input like this:

window_entities: !input window_entities

I get following error:

extra keys not allowed @ data['template_value']. Got None required key not provided @ data['value_template']. Got None

Am I missing something or isn’t it possible to leave a list empty in a blueprint?

Thanks in advance

2 Likes

every variable in a blueprint needs to be filled in. Blanks will make it error out.

yes, but you also can check if the optional input is set and check its value in the trigger. You will get no error but the trigger won’t work either.