How do I automate based on the trigger of another device?

And many more posts already on this topic.

Rather use the event listener under the dev tools to see all event data.