Is it allowed to include a variable in the definition of an alias in a choose or if section of an automation action e.g.
In the choose alias below I have added the trigger.id to the string defining the alias i.e. - alias: "Light on request from: {{trigger.id}}"
With this in my automation I do not get any errors or warnings in the logs but have noticed that since adding it I now get “Not all shown logbook entries might be related to this automation.” in the Trace Timeline for this automation. I used to get the full trace timeline details.
Based on the experiment I performed, the Jinja2 interpreter doesn’t process the alias option so any template you put there is retained verbatim.
You can prove it to yourself by examining your automation’s trace. Check the value of alias and you should see that the template you put there still looks like a template. For example, in the following trace the template is shown unchanged and wasn’t replaced by the actual value of trigger.id.
The automation’s Trace Timeline completed nominally.
If you’re concerned about the “Not all shown logbook etc” message, I just checked a random bunch of my automations (all work perfectly) and their traces all have that message.
I even have one that stopped at its initial condition so there’s effectively no Trace Timeline produced and even that one has the message. I just treat it as boilerplate disclaimer.
Yes. Thanks. I’ve come to the same conclusion that the Trace Timeline not showing on some of my automations does not seem to have any correlation to the operation of the automation itself.
Seems to be a half implemented feature that can be useful when it works, but should not be relied upon
I think most users would expect the information shown in the first diagram for all automations. That’s what I mean about half implemented.
There may be good technical reasons why it does what it does, but a feature is only half a feature when it sets an expectation for the user and then fails to deliver it.
I do not mean offence. What we have in HA today is significantly better than what we had when I started using it, but to me, the Trace Timeline does not meet the expectations it sets i.e. it’s only half implemented.
Full disclosure: I am (amongst other things) a Product Manager and care about delivering features that meet the users expectations
Download the trace file for the example in the second screenshot and post it as an Issue in Home Assistant’s GitHub Core repository. Ask why there’s no trace timeline shown despite the fact the diagram appears to indicate it executed actions in the automation.