Glitch in the activity history?

I have a group entity controlled by homeassistant.turn_on and homeassistant.turn_off in the automation. However, the activity page is a little confusing as it says:

Turned [OFF] triggered by ..... : turn_[ON]

Is this a misspell somewhere in the code? Thx

Not a typo, and your automation is fine. It's a known logbook quirk with group entities, and the tell is that the two halves of that line come from two different places:

  • "Turned off" = what the group actually did (its state went to off). That part is correct.
  • "triggered by action Home Assistant Core Integration: turn_on" = not what happened to the group, but the context the logbook matched the change to. "Home Assistant Core Integration" is just the homeassistant domain (which provides homeassistant.turn_on / turn_off), and turn_on is the service call it latched onto.

Why they disagree: the logbook ties every state change to a context id, and a group's state is derived from its members. When the group recalculates, the context on that recalculation can trace back to an earlier turn_on still in the context chain rather than the turn_off that actually drove it. So you get "off" (the real state) glued to "turn_on" (a mis-resolved context). It's cosmetic. The lights turned off correctly, only the "triggered by" label is wrong.

This is long-standing and widely reported, not your code. It shows up identically with ZHA light groups ("turned off triggered by action Light: Turn on") and even input_boolean helpers ("Turned off triggered by ... Generic turn off"). Nothing to fix on your end.

If the noise bugs you, it's purely a display thing, so the simplest answer is to ignore it. Acting on the member entities instead of the group sometimes reads cleaner, but since the root cause is the group's derived-state context, moving away from homeassistant.turn_* won't reliably fix it.

1 Like