I have a blueprint that sets a bunch of template sensor attributes. Right now when the user creates an automation with the blueprint these values are stored but not set until a restart occurs.
I know that an event happens when this automation is saved:
That would then trigger the same call I am making to set the variables on start? Is that id value available as a variable? If so, can someone mock up how this would look?
The self-triggering you are looking for doesn’t happen in a basic test automation… I assume it’s something to do with the timing of the event being posted to the Event bus and the Automation actually being fully instantiated. It still requires a restart or edit & save.
I am using this and it is triggered by the automation save event. I had this in place without the delay as the value changed in the blueprint input was not reflected. I added the delay in the hopes that things were happening too fast. Unfortunately it does not get past the delay on the trace which is odd but more importantly, the changed variables are not updated so this was for nothing.
I have found that if I make another change without the delay it will save the previous iteration. It is always one change behind. I am unsure what to do to get things in sync. I think this is still doable but I am going about it the wrong way. Any suggestions are most appreciated.