home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.29k stars 30.25k forks source link

Home assistant deletes traces from running automations #117133

Open Gaff opened 5 months ago

Gaff commented 5 months ago

The problem

Conside this scenario:

  1. I write an automation than run every minute that (sometimes) waits for 15 minutes then turns on a light.
  2. 15 minutes later light in my house comes on.
  3. I go into HASS, it says "tiggered by automation X"
  4. I look at the traces for automation X, but it just shows the last 5 minutes of traces where nothing happend.
  5. WTH?!?!

This is because home assistant only keeps a certain number of traces, and if you have a time based automation you tend to have a lot of empty traces.

Possible workaround:

Make the default number of traces 10 or 100? Is there any reason for the limit to be so low? Memory I guess?

Possible fixes:

Dull runs could be things such as "Stopped because only a single execution is allowed", or runs that don't get past "wait" steps.

What version of Home Assistant Core has the issue?

core-2024.5.0

See also:

This feature enhancement request for something similar: https://community.home-assistant.io/t/make-traces-persist-longer-or-make-how-long-they-last-configurable/302348

NordFreak commented 2 months ago

Yes, I would also like better customization.

Maybe also a global option to set the number of traces, and setting a value in the automation overrides the global value. That would have made my beginnings in HA much easier.

I work in my automations with many triggers within an automation. I would like to be able to configure the traces like this: Info, Warning, Critical.

Info: All the spam that ends up in the traces now, even if nothing was executed because the remaining conditions were not met.

Warning: Small errors, for example, if conditions do not work because they are configured incorrectly.

Critical: Everything that prevents or disturbs the complete automation.

I hope you understand what I mean. That would definitely help.