mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-27 19:26:36 +00:00
Fix bluetooth device info is encoding data twice (#25353)
Data is already encoded
This commit is contained in:
parent
603663e0cc
commit
7bd9a39bf5
@ -29,9 +29,8 @@ class DialogBluetoothDeviceInfo extends LitElement implements HassDialog {
|
||||
}
|
||||
|
||||
public showDataAsHex(bytestring: string): string {
|
||||
return Array.from(new TextEncoder().encode(bytestring))
|
||||
.map((byte) => byte.toString(16).toUpperCase().padStart(2, "0"))
|
||||
.join(" ");
|
||||
const bytes = bytestring.match(/.{2}/g) ?? [];
|
||||
return bytes.map((byte) => `0x${byte.toUpperCase()}`).join(" ");
|
||||
}
|
||||
|
||||
private async _copyToClipboard(): Promise<void> {
|
||||
|
Loading…
x
Reference in New Issue
Block a user