#Optional Inputs in Blueprints that are used as triggers if defined

1 messages · Page 1 of 1 (latest)

frigid wave
#

I’m creating a blueprint for a cover automation, and I’ve run into a problem with optional inputs.

Some of my covers have a door/window sensor, and some do not, so this sensor input needs to be optional. When a sensor is provided, the cover should react to its state, so I need a state trigger for that entity.

However, if I try to create an automation from the blueprint without assigning a window sensor, Home Assistant throws an error:

Message malformed: Entity IDs cannot be None for dictionary value @ data['entity_id']

It seems like the blueprint engine still tries to register the trigger, even when the input is not configured.

I’m looking for a clean way to enable/disable triggers based on whether an input was provided. I already tried using the enabled property of the trigger together with an input boolean, but that also doesn’t seem to work.

What is the recommended approach for optional triggers in blueprints?

I attached my blueprint.

Thanks in advance

sage canopy
#
#

Might help?

frigid wave
#

I tried to replicate the example but it doesn't work. Any ideas?

#

I think the error happens because the entity_id is None (door_sensor), and that seems to get checked before the enabled property comes into play. The error shows up even when I link the enabled property to the input boolean (door_sensor_enabled), so it seems like the problem happens earlier. Is there any solution to this?

frigid wave
#

I think I managed to get it to work using a template trigger