How to find source of device change in automation