Logging who is turning my bedroom light on during the night!

My bedroom light is being turned on at night, which obviously wakes me up!
The action is obvious in HA history, but not who instigated the switch.

Its a sonoff light reflashed with ESPhome and i need to set the logging for this one entity to debug to try and track the source of this action.
There are no autiomations tied to this light, although it is also part of a group. But the whole group does not get triggered

What is the setting in configuration.yaml to enable this?
Do i increase logging on the light component, or esphome or can i just debug one entity.
I have searched for this solution, but its not obvious in the results ive found.

Debug logging will not tell you anything extra. All the context available is listed in the logbook. e.g. (read from the bottom up)

I turned the lights off at 22:12 and “something” turned them back on at 23:51
But who or what…

Is there no logging to say which user or interface triggered an action, not even a web access/api log. surely thats an oversight?

image

If there is no context then it is something outside Home Assistant doing it.

Do you use Alexa? If so, look for Hunches.

https://www.amazon.com/gp/help/customer/display.html?nodeId=G7F5F7K93GKSLC4F