How to find source of device change in automation

I want to run an automation when the thermostat is manually changed, vs a change that is triggered by HA. The logbook shows a difference in the way the change is triggered, including showing the user who made the change from the HA side along with the service call, vs showing nothing if the change was done on the physical thermostat, however, I can’t figure out how to trigger an automation, or set an automation condition, based on this difference.
image
image

Any ideas?

Thanks! This should take care of my needs. It would be very nice to have this as part of the visual editor, but templating will get the job done.