Logbook - Trigger Event

Would love if the logbook referenced the automation (or script?) that changed the entity state. Most of my logbook is full of this:

image

Which, technically, is correct, but doesn’t specify what automation/script actually caused the state change - just shows the entity that triggered the automation.

Would prefer it to have listed this:
image

Which is what really caused the fan to turn on.

Your second image show no event context at all.

It’s a snip that shows the automation that actually changed the state of this entity.

Would be infinitely more helpful to see this automation name then that the fan was turned on by some other entity…

I would assume that many people have automations that are triggered by the same entity, but with different conditions. So knowing the entity that caused the state change is helpful, but knowing exactly which automation changed the state would be far more so.

I don’t see any “turned on by” in the second image. All I see is the entity that turned on:

Where is the info that shows which automation caused this?

Actually I prefer to limit each available trigger to a single automation that does multiple things. That way there are not multiple automations racing for the same trigger and possibly causing unexpected behaviour as you have no control over the order in which they are executed.

So in that case, a single automation causes multiple actions and entity changes, what would your display do?

Image 1 above is log file. Image 2 above is the automation.

The simple fact is that the Anthem AV entity turning on is what triggered the automation. The log says the fan was turned on by the Anthem AV entity, but in reality the Anthem AV only triggered the automation, which in turn turned on the fan.

My only point, and the reason for this feature request, is that, to me, I’d prefer to see the name of the automation that turned on the fan entity versus the Anthem AV entity in the logs.

If I’m trying to trace back and troubleshoot why a certain entity turned on seeing the automation it was turned on by is infinitely more helpful for me than seeing the entity that triggered the automation that turned it on…

Just to kick the horse. Here’s an example from this morning. I have a lamp in my family room with a colored bulb in it. I have an automation that starts at 6:50am and changes the lamps colors from yellow to red by 7:00am as a visual ‘school bus is coming’ countdown we can see from the kitchen.

I looked over at ~6:57am and the lamp was off… Hmm, that’s not right! So, I pulled up the logs and see this:

image

I have 0 automations triggered by the ‘Front Lights’ and nothing that would leverage the Front Lights to change the state of the Family Room Lamp… So how do I troubleshoot? My best bet was to look thru the list of automations and start trying to guess which one could be the culprit. After reviewing a few, I found my ‘Sunrise’ automation and saw the ‘Family Room Lamp’ was, in fact turned off by this automation.

This automation, triggered by Sunrise, turns off 3 different entities - the Front Lights being the FIRST in the list, the Front Hall Lamp being the 2nd and the Family Room Lamp being the third. Which means… The logbook is showing (very randomly IMO) that the first entity turned off in the automation is the ‘reason’ the Family Room Lamp turned off…

This just makes no sense to me and makes the logs meaningless. The log should IMO, show:

Family Room Lamp turned off by Sunrise automation

Now this would be useful and allow me to instantly troubleshoot. Hope this example helps to clarify.

Do you have automations excluded from your logbook or recorder?

Because I do see logged events like this:

That’s helpful to see, ty! I use include: domains: in my config and do NOT have -automation listed (they don’t show up in my log file). Guessing then that this is the issue?

Also then guessing that if I add this I’ll then need to EXCLUDE all of the automations that run every 2 or 5 or x minutes as well as ones that are not important to me.

Realize it might be contra - logic - but maybe for individuals (like me [maybe there are more?]) that don’t have automations included in the log these ‘turned on / off by’ events should still list the automation vs. 1st entity w/in the automation? Just a thought - and again, realize this is somewhat against the grain.