Manual switch detection using device Logbook

I’m using a Candeo Zigbee Dimmer switch for my ceiling lights, and have been trying to figure out how to detect when the light is manually pressed vs triggered via HA. I got a hint of how to solve this when looking at the device’s logbook, where it distinguishes between being called by HA and just being turned on and off, as shown in the following screenshot:

image

Does anyone have any suggestions how I can utilise this information in automations? Currently I can only see options in the automation screen to detect if the device’s state changed, but not what caused it.

See here :

That seems to have done it. Thanks for the help!