Action to initiate a "Diagnostic report" creation

Hey team,

it would be great to have a service/action to create a diagnostic report for a hub/integration/account (whatever the right term is - just the same like click on download diagnostic report on the integration page). The file should be saved in a safe space on the server.

Use case:
Sometimes integrations are raising exception only in rare conditions and it would be great to dump a diagnostic report at this moment. I would like to create an automation that dumps the report.

Thanks

Hello Rene Nulsch,

This is the current version of that.

Thanks. I’m using this whenever I have problems with HA already. My ask is for situations where sometimes (2-3 per week) an API of a component delivers inconsistent data and I want to store this somewhere for better analysis or bug reporting.

I have solved it for me now with the following approach:

  1. Enable the fire_event option of the component system_log
  2. Use an automation to react on events based on my special conditions
  3. Use a rest sensor to pull the diagnostic report from /api/diagnostics/config_entry/…
  4. Update the rest sensor in the automation.

Thx again…