fixed bluetooth attr formatting
This commit is contained in:
parent
aab4749b1d
commit
fdb0e69f82
@ -526,7 +526,7 @@ def get_bluetooth_devices(connection: Connection, only_connected: bool = False,
|
|||||||
devices = [device for device in devices if device["connected"] == "yes"]
|
devices = [device for device in devices if device["connected"] == "yes"]
|
||||||
|
|
||||||
if format_for_hass:
|
if format_for_hass:
|
||||||
devices = [{"name": device["name"], "mac": device["address"]} for device in devices]
|
devices = "; ".join([f"{device['name']} ({device['address']})" for device in devices])
|
||||||
|
|
||||||
return devices
|
return devices
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user