Trigger template entities are basically a mini automation. They have a trigger, that sets a trigger
variable and you use the data of that trigger to set the state and/or attributes of the entity. This could be represented in a trace like what HA does with automations. In fact when debugging complex ones I often make them into an automation like this:
trigger:
# copy and paste all the triggers here
action:
- variables:
# copy and paste name, state, attributes, etc. All the config for entity you're making
- variables:
noop: ''
# need another step to see the values set to variables in the preceding step, doesn't do anything
Then I can see exactly what happened and debug if something went wrong.
Now not every trigger template entity needs this, many are very simple. So unlike automations I wouldn’t recommend defaulting to 5 traces per trigger template entities. But it would be great if you could set stored_traces
to turn this feature on and then review them in the UI.
This could also apply to non-trigger template entities although those can generally be debugged in dev tools. Since they can only look at the state machine so you can review the state of every referenced entity and sub those values in, something that isn’t possible with trigger ones since the trigger may not be state-based. Still kind of a pain for complex ones so traces could be a useful option there too.