Way to determine if entity state was changed by the current automation?

I am trying to determine if a light was changed by anything other than the current automation checking for this condition. Is there a way to get the source of the entity change and compare it to the automation trying to control that same entity?