Adding conditions to blueprint based automation

What is the proper way to go about adding conditions to an automation? For example if I create a new automation using the motion light blueprint can I add a condition to so that it only triggers during a certain time window when the sun is set, etc? Or do I have to make a new copy of the blueprint and edit that? When I create an automation based on a blueprint I’m not able to add additional conditions in the UI but I’m not sure if it will work if I manually add one to the automations yaml. It would be great if I could use a blueprint to create an automation as a baseline and then add/remove/modify aspects of it.

1 Like

It will work.

Ok thanks. I wasn’t sure because there is no indication in the UI that the condition is there, it shows the automation being based on the selected blueprint so I wasn’t sure what would happen until later on when something makes the condition true.

I have been working on this as we speak. I copied the blueprint and I added an action selector to one of the door / light blueprints.

Is that what you are looking for?

Not really. I took the existing blueprint and added conditions for time of day and sun position. If I edit the automation in the UI I don’t see any of those conditions but they do work just fine. I’m controlling the lights along my front walk, they’re on a timer that turns them on in the evening then shuts them off later at night. If somebody steps outside at night after the lights have shut off and before the next sunrise, the motion detection from my security camera turns them on for 5 minutes and then turns them back off. If the lights are already on when motion is detected then nothing happens, this prevents them from getting turned off if they were on due to the time schedule or because I turned them on manually. It all works brilliantly although it would be nice if the UI would accurately display the automation with all of the conditions instead of just the blueprint it is based on.

I’m not sure exactly what the vision was when blueprints were designed but I kind of think the way it ought to work is importing a blueprint just sets everything up in the automation which is then freely alterable, kind of like pasting a template into a blank sheet. I’m aware that it’s a fairly new feature though so I thought I’d wait and see how it matures.

3 Likes

Can you please share your blueprint?