"Show as" entities' Activity log not showing the Automation it was triggered by

In my example (screenshot attached), I have a switch entity for my “Front Door” light, which I have later made appear as a light entity with the “Show as” function.

Concentrating on the bottom 2 of 4 windows first for the Automation definitions.

I have 2 automations set up:

  • One older one for Sunrise (bottom left), where I used the former switch entity.
  • One more recent for iPhone geofencing (bottom right), where I used the light entity.

Both automations work as expected.

Now at the top I have the 2 entity Activity windows open, left for the switch, right for the corresponding light (same device, renamed the entity with “Show as”).

The newer iPhone geofencing automation (bottom right), using the “light turn on” action, is correctly referenced in both entity activity logs (green arrows pointing to automation names).

The older sunrise automation (bottom left), using the “switch turn on”, is only referenced in the switch activity log (left), but not in the light activity log of the light (right). See 18:42:16 time mark and compare both sides.

The latter case is an issue, because I cannot see from the (newer) light entity activity log why the light was turned on. Can someone explain if this is expected behavior. In my humble opinion it is a bug.

Yes, this is because the old automation is only referencing the switch. Change the old automation to reference the light, they are separate entities. Show as does not change the domain, it creates an additional separate entity and hides the original.

Tested this with a new automation referencing using the switch, for which I expect HA to know there is a light. Same Activity log behaviour.

So, in other words, the automation (either predating or created after show-as change) knows the new light entity was once a switch entity, but doen’t know the inverse? I somehow see the logic when comparing how file aliases work in computer terms (the alias knows it points to a file, but the file doesn’t know it has an alias), but it makes for very incomplete Activity logs for the switch if it is not replaced by the light in existing automations.

The only solution to fix activity logs is to manually check every switch entity that has been changed into a light, and go into the “Part of following automations” info to update them.

I had hoped that HA could connect the dots, or at least signal the potential problem under Repairs.

That’s correct, because the light uses the switch to get it’s state, the switch does not know about the light.

OK, my feeling is that HA, as a framework should know. But now I know, I’m good, thanks