Document how to obtain device logs for ESPHome (#37739)

Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
This commit is contained in:
J. Nick Koston 2025-02-27 15:33:52 +00:00 committed by Franck Nijhof
parent 3e33e65ce3
commit 08716ff29c
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3

View File

@ -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
```