mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Add btle_name attribute to devices (#19915)
* 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>
This commit is contained in:
parent
d859c3fa86
commit
616f23ae1d
@ -89,5 +89,7 @@ class GoogleHomeDeviceScanner(DeviceScanner):
|
|||||||
devices[uuid]['btle_mac_address'] = device['mac_address']
|
devices[uuid]['btle_mac_address'] = device['mac_address']
|
||||||
devices[uuid]['ghname'] = ghname
|
devices[uuid]['ghname'] = ghname
|
||||||
devices[uuid]['source_type'] = 'bluetooth'
|
devices[uuid]['source_type'] = 'bluetooth'
|
||||||
|
if device['name']:
|
||||||
|
devices[uuid]['btle_name'] = device['name']
|
||||||
await self.scanner.clear_scan_result()
|
await self.scanner.clear_scan_result()
|
||||||
self.last_results = devices
|
self.last_results = devices
|
||||||
|
Loading…
x
Reference in New Issue
Block a user