Debug Component

The debug component can be used to debug problems with ESPHome. At startup, it prints a bunch of useful information like reset reason, free heap size, ESPHome version and so on. It also allows you to get the same information as a text sensor, and to monitor the state of the ESP heap memory (free space, maximum free block size and fragmentation level) and the main-loop timing.


Example debug component output.

# Example configuration entry
  update_interval: 5s

  - platform: debug
      name: "Device Info"
      name: "Reset Reason"

  - platform: debug
      name: "Heap Free"
      name: "Heap Fragmentation"
      name: "Heap Max Block"
      name: "Loop Time"
      name: "Free PSRAM"

# Logger must be at least debug (default)
  level: debug

Text Sensor

Configuration variables:

  • device (Optional): Reports the following device information:

    • ESPHome Version

    • Free heap size at startup

    • Flash chip size, speed and mode

    • ESP32:

      • Chip model, cores, revision

      • Chip features (BLE / BT / WiFi_BGN / EMB_FLASH / EMB_PSRAM / …)

      • ESP-IDF version

      • EFuse MAC

      • Reset reason

      • Wakeup reason

    • ESP8266:

      • Chip id, frequency

      • Flash id

      • SDK, Core & Boot versions

      • Reset reason & information

    Accepts all options from Text Sensor.

  • reset_reason (Optional): Reports the last reboot reason in a human-readable form. Accepts all options from Text Sensor.


Configuration variables:

  • free (Optional): Reports the free heap size in bytes. All options from Sensor.

  • fragmentation (Optional): Reports the fragmentation metric of the heap (0% is clean, more than ~50% is not harmless). Only available on ESP8266 with Arduino 2.5.2+. All options from Sensor.

  • block (Optional): Reports the largest contiguous free RAM block on the heap in bytes. All options from Sensor.

  • loop_time (Optional): Reports the longest time between successive iterations of the main loop. All options from Sensor.

  • psram (Optional): Reports the free PSRAM in bytes. Only available on ESP32. All options from Sensor.

See Also