mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Add 'last seen' to BT advertisement montior (#24361)
* Add 'last seen' to BT advertisement montior * use ha-relative-time
This commit is contained in:
parent
9e1d64e728
commit
cc04457d72
@ -12,6 +12,7 @@ import type {
|
||||
} from "../../../../../components/data-table/ha-data-table";
|
||||
import "../../../../../components/ha-fab";
|
||||
import "../../../../../components/ha-icon-button";
|
||||
import "../../../../../components/ha-relative-time";
|
||||
import type {
|
||||
BluetoothDeviceData,
|
||||
BluetoothScannersDetails,
|
||||
@ -140,6 +141,18 @@ export class BluetoothAdvertisementMonitorPanel extends LitElement {
|
||||
sortable: true,
|
||||
defaultHidden: true,
|
||||
},
|
||||
time: {
|
||||
title: localize("ui.panel.config.bluetooth.last_seen"),
|
||||
filterable: false,
|
||||
sortable: true,
|
||||
defaultHidden: false,
|
||||
template: (ad) =>
|
||||
html`<ha-relative-time
|
||||
.hass=${this.hass}
|
||||
.datetime=${ad.datetime}
|
||||
capitalize
|
||||
></ha-relative-time>`,
|
||||
},
|
||||
rssi: {
|
||||
title: localize("ui.panel.config.bluetooth.rssi"),
|
||||
type: "numeric",
|
||||
@ -167,6 +180,7 @@ export class BluetoothAdvertisementMonitorPanel extends LitElement {
|
||||
scanner?.name ||
|
||||
row.source,
|
||||
device: device?.name_by_user || device?.name || undefined,
|
||||
datetime: new Date(row.time * 1000),
|
||||
};
|
||||
})
|
||||
);
|
||||
|
@ -5369,6 +5369,7 @@
|
||||
"source": "Source",
|
||||
"rssi": "RSSI",
|
||||
"source_address": "Source address",
|
||||
"last_seen": "Last seen",
|
||||
"device": "Device",
|
||||
"device_information": "Device information",
|
||||
"advertisement_data": "Advertisement data",
|
||||
|
Loading…
x
Reference in New Issue
Block a user