fixed bluetooth attr formatting
Some checks failed
Validate with hassfest / validate (push) Failing after 2s
HACS Action / HACS Action (push) Failing after 4s

This commit is contained in:
Mathieu Broillet 2024-01-01 17:03:40 +01:00
parent aab4749b1d
commit fdb0e69f82
Signed by: mathieu
GPG Key ID: C0E9E0E95AF03319

View File

@ -526,7 +526,7 @@ def get_bluetooth_devices(connection: Connection, only_connected: bool = False,
devices = [device for device in devices if device["connected"] == "yes"]
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
else: