Navigation Menu

Skip to content

Commit

Permalink
Add btle_name attribute to devices (home-assistant#19915)
Browse files Browse the repository at this point in the history
* Update googlehome.py

Added name from bluetooth device to attributes

* Update homeassistant/components/device_tracker/googlehome.py

Check if key exists before assigning name

Co-Authored-By: cliffordwhansen <clifford@nighthawk.co.za>
  • Loading branch information
cliffordwhansen authored and alandtse committed Feb 12, 2019
1 parent abde0ae commit 2e137a1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions homeassistant/components/device_tracker/googlehome.py
Expand Up @@ -89,5 +89,7 @@ async def async_update_info(self):
devices[uuid]['btle_mac_address'] = device['mac_address']
devices[uuid]['ghname'] = ghname
devices[uuid]['source_type'] = 'bluetooth'
if device['name']:
devices[uuid]['btle_name'] = device['name']
await self.scanner.clear_scan_result()
self.last_results = devices

0 comments on commit 2e137a1

Please sign in to comment.