Skip to content

Commit

Permalink
Use device name stored in device_info for tag scan in ESPHome (#40130)
Browse files Browse the repository at this point in the history
  • Loading branch information
jesserockz authored Sep 16, 2020
1 parent d650bcc commit 16e0ed9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions homeassistant/components/esphome/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,10 @@ def async_on_service_call(service: HomeassistantServiceCall) -> None:
# Call native tag scan
if service_name == "tag_scanned":
tag_id = service_data["tag_id"]
device_id = service_data["device_id"]
hass.async_create_task(
hass.components.tag.async_scan_tag(tag_id, device_id)
hass.components.tag.async_scan_tag(
tag_id, entry_data.device_info.name
)
)
return

Expand Down

0 comments on commit 16e0ed9

Please sign in to comment.