Any way to know what triggered a state change?

There is already a feature request here:

And someone in there mentioned that is already in the To-Do list of home assistant.