Is there a way to pass the entity_id that fired a trigger to a Python script?
I have a single Automation set up with two triggers, one for each of my garage doors. I’d like to pass the entity_id of the door that fires the Automation to the Python script. I know I could set up two separate Automations and hard code the entity_id, but I’m looking for something more elegant.
So moving forward, I’ve changed my Automation from triggering on state to triggering on event. This changes the format of where the entity_id is located. Instead of being a direct child of trigger it is now under event_data.
Is there a doc that explains how the data binding between an Automation and Python Script works? I’d prefer to be pointed to where I can figure this out myself, but if a doc doesn’t exist I’d appreciate some help.