How to create a trigger when a device is turned on by its physical controls?

I have several automations that turn on a desk lamp. See logbook below in red. What I want is to trigger an automation that fires when the lamp is turned on by the physical controls on that lamp. See below in green.

In other words, if the lamp turns on via some automation, I don’t want to do anything. But if I physically turn on the lamp by pressing the On button, I want to fire a trigger. Thoughts?

image

You need to use a State trigger then condition on the values contained in the context variable of the entity’s state object:

Thank you @Didgeridrew! I will give this a try.