Increase Number of Available Automation/Script Debug Traces

It would be great to set the number of traces to save per automation or script. A default value could be used with the ability to set a higher value if necessary.

This would allow for increased debugging ability by having more traces to examine.

You can do this already, look here:

5 Likes

Is this per automation or globally?

As per the document I linked:

The last 5 traces are recorded for all automations. It is possible to change this by adding the following code to your automation.

Therefore all automations and scripts have a default of 5 traces and you can set more per automation as the document says.

Note however setting it too high is a waste of time as when home assistant restarts all stored traces are lost anyway.

Perfect thank you.

I’m interested in this too. Could someone show a larger piece of yaml code that shows where in the automation this trace: goes.

Just add anywhere in the automation such as the end

For example after mode…

mode: single
trace:
  stored_traces: 10
5 Likes

Perfect. Thanks.