Use device name stored in device_info for tag scan in ESPHome (#40130)

This commit is contained in:
Jesse Hills authored and GitHub committed 2020-09-16 12:22:06 +02:00
1 parent d650bcca3b
commit 16e0ed9242
1 file changed
+3 -2
+3 -2
View File
@@ -133,9 +133,10 @@ async def async_setup_entry(hass: HomeAssistantType, entry: ConfigEntry) -> bool
# 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