Context.parent_id

So to recap, this logic is not correct:

It’s a chicken-egg scenario. You’re not accessing the context you think you’re accessing.

Yea i know. The this doesn’t make sense. Forget that template. It also doesn’t work with this trigger:

platform: state
entity_id:
  - light.living_room_standing
to: null

or this one for that matter:

platform: state
entity_id:
  - light.living_room_standing

If the light state is changed by the time trigger (in another automation) context.parent_id stays null although the light has been changed by the automation.

Yes, I see that too. That would be a bug.

Yeah, i’ve linked a related github issue earlier. Currently this is still a problem.
Thanks for the help nonetheless.