Is it possible to convert blueprint to automation?

I’m a total HA newbie, so I apologize if this idea exists already or is dumb. I was playing with the blueprint Send a camera snapshot when motion is detected which has helped me understand cameras and notifications better. It lets you select a motion sensor as a trigger.

What if I want to trigger by a Nest doorbell person detected trigger instead? Or, say I want to add an additional action like turning on a front porch light? I can do this by editing the blueprint YAML But I can’t see any way to do it in the HA web interface? Blueprint automations are linked to their blueprint, so I can’t change that stuff.

Is there any way to unlink an automation from a blueprint and treat it like a regular automation, so I can change things like triggers or add conditions and additional actions in the web UI?

1 Like

Yes, you can.

just look past all of the added “blueprint” fluff and start at the trigger, condition and action sections.

you can use those portions in an automation and modify them as desired since that’s literally all a blueprint is is a way for people to fill out a form to modify those sections themselves and it will then run exactly like any other automation.

I’ve done it myself for a couple of blueprints I’ve found useful without using the actual blueprint itself.

As a matter of fact, I believe the blueprint actually creates an automation entity out of the blueprint when it’s completed.

After you import a blueprint, there is a button to the right that says create automation. Click on that and on the next screen give a name and fill in the blanks.

Indeed there is but that creates an automation based on the chosen blueprint. That automation cannot operate without the presence of its associated blueprint.

What danjb wants is:

The way to do that is to pick apart the blueprint; discard all the bits handling Selectors (the “fluff” finity mentioned) and retain the parts involving automation logic.

The resulting automation is often more compact because it now deals with specifics as opposed to generalizations.

I didn’t know that part.

I figured once automation was created it was independent of the blueprint.

The last time I looked (when blueprints were first introduced) the generated automation was fairly minimal consisting of a reference to its blueprint (its “parent”) and whatever entities/actions chosen by the user via the blueprint’s Selectors. You can append logic to it but all its core logic remains in the blueprint.

The whole idea is that if you modify a blueprint’s logic, all of its related automations (its “children”) inherit the new characteristics.

Yes, i would love to be able to have a convert blueprint to automation button in the UI. I have yet to find a Blueprint that works for me, I always have to go editing the blueprint to change a sensor class or something. It would be so much simpler to just convert it back into an automation and be able to do it in the GUI.

5 Likes

You can copy/paste the automation “instance” by creating an Automation from a Blueprint, then selecting “SHOW TRACE” in the UI, once there, click the “Automation Config” tab and it will show the YAML for the full automation as configured by your blueprint choices. You can copy that YAML and use it to create a new automation that you can edit however you want.

13 Likes

You learn something new every day :slight_smile: Exactly what I needed, thanks!

1 Like