Small fixes for Bluetooth device info (#24436)

* Add missing service uuids to Bluetooth device info

Service UUIDs are different from Service data because
they do not have any data attached to them. I only
discovered that they were missing in the UI because
of helping a user troubleshoot of device, and we could
not find the Service UUID

* fix mapping

* fix mapping

* fix mapping

* tweaks
This commit is contained in:
J. Nick Koston 2025-02-28 08:03:15 +00:00 committed by Bram Kragten
parent 99f86bb9cf
commit f020269447
2 changed files with 18 additions and 6 deletions

View File

@ -81,10 +81,8 @@ class DialogBluetoothDeviceInfo extends LitElement implements HassDialog {
${Object.entries(this._params.entry.manufacturer_data).map(
([key, value]) => html`
<tr>
${key}
</tr>
<tr>
${this.showDataAsHex(value)}
<td><b>${key}</b></td>
<td>${this.showDataAsHex(value)}</td>
</tr>
`
)}
@ -97,10 +95,23 @@ class DialogBluetoothDeviceInfo extends LitElement implements HassDialog {
${Object.entries(this._params.entry.service_data).map(
([key, value]) => html`
<tr>
${key}
<td><b>${key}</b></td>
<td>${this.showDataAsHex(value)}</td>
</tr>
`
)}
</tbody>
</table>
<h4>
${this.hass.localize("ui.panel.config.bluetooth.service_uuids")}
</h4>
<table width="100%">
<tbody>
${this._params.entry.service_uuids.map(
(uuid) => html`
<tr>
${this.showDataAsHex(value)}
<td>${uuid}</td>
</tr>
`
)}

View File

@ -5378,6 +5378,7 @@
"advertisement_data": "Advertisement data",
"manufacturer_data": "Manufacturer data",
"service_data": "Service data",
"service_uuids": "Service UUIDs",
"copy_to_clipboard": "[%key:ui::panel::config::automation::editor::copy_to_clipboard%]"
},
"thread": {