Add additional metadata to events for cloud ingestion

I’d like to install Home Assistant in multiple homes and send event data to the cloud for analysis/presentation.

The Pub/Sub Integration works great for sending a filtered stream of events, but the event data doesn’t tell me which home it came from. It would be great if there was an ID in the event data to identify the Home Assistant installation itself.

This could easily be added here, but it might be worth considering a generic way of augmenting events with arbitrary metadata so that the same could be made possible for AWS SNS and so on.

The only way I can see to achieve this otherwise is to write an add-on that subscribes to events via websocket and sends them to Pub/Sub manually, but I’m hoping to avoid this level of customisation.