J. Nick Koston 08716ff29c
Document how to obtain device logs for ESPHome (#37739)
Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
2025-03-05 10:36:07 +00:00

3.2 KiB

title description featured ha_category ha_release ha_iot_class ha_config_flow ha_codeowners ha_domain ha_zeroconf ha_platforms ha_integration_type ha_dhcp works_with
ESPHome Support for ESPHome devices using the native ESPHome API. true
Alarm
DIY
Update
0.85 Local Push true
@OttoWinter
@jesserockz
@kbx81
@bdraco
esphome true
alarm_control_panel
assist_satellite
binary_sensor
button
camera
climate
cover
date
datetime
diagnostics
event
fan
light
lock
media_player
number
select
sensor
switch
text
time
update
valve
device true
local

This integration allows ESPHome devices to connect directly to Home Assistant with the native ESPHome API.

{% include integrations/config_flow.md %}

Home Assistant actions

ESPHome devices can perform actions to any Home Assistant action. This functionality is not enabled by default for newly configured device, but can be turned on the options flow on a per device basis.

{% include integrations/option_flow.md %}

Entity naming and IDs

ESPHome uses different naming and entity ID rules based on the configuration of the ESPHome device. It is recommended to set a friendly_name in the ESPHome {% term "configuration.yaml" %} to take advantage of the newer naming structure, which is consistent with Home Assistant naming standards and makes it much easier to tell similar devices apart. The legacy naming rules apply when the friendly_name is not set in the {% term "configuration.yaml" %}.

Friendly naming

  • Entity name is a combination of the friendly name and component name
  • Entity ID is derived from the entity name with the device name prepended

Example:

esphome:
   name: "livingroomdesk"
   friendly_name: "Living room desk"

sensor:
   name: "Temperature"

The entity will be named Living room desk Temperature and will default to having an entity ID of sensor.livingroomdesk_temperature.

Legacy naming

  • Entity name is the component name
  • Device name is not prepended to the entity name
  • Entity ID is derived solely from the entity name

Example:

esphome:
   name: "livingroomdesk"

sensor:
   name: "Temperature"

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, 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: