Fix BLE name assignment

This commit is contained in:
Dennis Heinze 2023-06-07 12:06:13 +02:00
parent e5f8c168c3
commit 786dacf8ca
No known key found for this signature in database
GPG key ID: D74FB5DB42CAD9A1

View file

@ -68,7 +68,7 @@ func (d *BLEDevice) Name() string {
name := d.DeviceName
if name == "" {
// get the name from the device
name := d.Device.Name()
name = d.Device.Name()
if name == "" && d.Advertisement != nil {
// get the name from the advertisement data
name = d.Advertisement.LocalName