A little advice on log files

Should I just use the log files already included in home assistant or is there a better option?

I am trying to track down why some automations are firing off and another anomaly with a fan light turning on that isnt in an automation that I know of.

Any advice would be appreciated. I will add what I need to be able to figure these out since trace isn’t really telling me anything useful. And nothing at all about the fan light turning on out of the blue,

If you cannot figure out the issue from the traces, I’m afraid no other log exists that are more useful.

Hm… Traces shows me what happened after some event occured, but it doesnt tell me what event occured. Maybe I am not using traces correctly then. I will look up information about how to best use it.

For troubleshooting automation, I find traces as a good reference. And it took me a while to understand how to use it effectively. Here is one example, where I have a motion sensor in the garage that turns the light ON when motion is detected and I could not figure out the output of traces.

After some deliberations I realized that with the action part of automation I made a condition (if sensor state == !(off)) then turn off the light, the intent was that motion sensor had reset after detecting motion so the garage light can be turned off.

The unintended effect of the above condition is that I did not account for “unavailable” state for the motion sensor, which was the problem in my case that prevented the light from turning off when the motion sensor was offline.

After traces I usually find looking at the state (or event) of each element in more details to troubleshoot.

What triggers do you have for those automations? In the trace you can see what exactly triggered the automation. But of course it can’t tell you what triggered the change that triggered the automation…

For example, if it’s a state trigger, you could find out more in the entity logbook.

It totally tells you with great details what triggered the automation

I started reading up more on traces. I figured there were things I wasn’t doing or didn’t understand. This was one of them. Next time something fires without me knowing why, hopefully this will be able to elaborate on it. Thank you for the reply

1 Like