Getting started - automation logic based on actor editing entry

I’m hoping someone can point me in the right direction:

I’m looking for a way to determine whether an entry was changed from a specific source.

For example, I have automation based on motion control for my garage lights, but I want to determine if after the lights were initially turned on from a motion event if someone manually adjusted the brightness versus the automation triggering the default scene and overwriting the manual change the next time the automation checks for a motion event.

Any help would be appreciated