From 08716ff29ce9d44a9d6d360513da0ce4f6ad5fd2 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Thu, 27 Feb 2025 15:33:52 +0000 Subject: [PATCH] Document how to obtain device logs for ESPHome (#37739) Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com> --- source/_integrations/esphome.markdown | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/source/_integrations/esphome.markdown b/source/_integrations/esphome.markdown index 0eef4080528..11c0552bdc1 100644 --- a/source/_integrations/esphome.markdown +++ b/source/_integrations/esphome.markdown @@ -95,3 +95,18 @@ sensor: ``` The entity will be named `Temperature` and will default to having an entity_id of `sensor.temperature`. + +## Obtaining logs from the device + +1. To have the device send logs to Home Assistant, in the [options flow](#options), enable `Subscribe to logs from the device`. + - They are logged under the `homeassistant.components.esphome` logger at the equivalent level. + +2. To adjust the logging level, there are two options: + - enable [debug logging](/docs/configuration/troubleshooting/#debug-logs-and-diagnostics), + - or use the [Developer Tools](/docs/tools/dev-tools/#actions-tab) to call the [`logger.set_level`](/integrations/logger/#action-set_level) action to specify the desired level: + + ```yaml + action: logger.set_level + data: + homeassistant.components.esphome: debug + ```