mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 09:16:38 +00:00
Add created/modified to registry tables (#21494)
This commit is contained in:
parent
a85dda3365
commit
4ade39543d
@ -82,6 +82,8 @@ export class HaDemo extends HomeAssistantAppEl {
|
|||||||
has_entity_name: false,
|
has_entity_name: false,
|
||||||
unique_id: "co2_intensity",
|
unique_id: "co2_intensity",
|
||||||
options: null,
|
options: null,
|
||||||
|
created_at: 0,
|
||||||
|
modified_at: 0,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
config_entry_id: "co2signal",
|
config_entry_id: "co2signal",
|
||||||
@ -100,6 +102,8 @@ export class HaDemo extends HomeAssistantAppEl {
|
|||||||
has_entity_name: false,
|
has_entity_name: false,
|
||||||
unique_id: "grid_fossil_fuel_percentage",
|
unique_id: "grid_fossil_fuel_percentage",
|
||||||
options: null,
|
options: null,
|
||||||
|
created_at: 0,
|
||||||
|
modified_at: 0,
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@ import { getEntity } from "../../../../src/fake_data/entity";
|
|||||||
import { provideHass } from "../../../../src/fake_data/provide_hass";
|
import { provideHass } from "../../../../src/fake_data/provide_hass";
|
||||||
import { HomeAssistant } from "../../../../src/types";
|
import { HomeAssistant } from "../../../../src/types";
|
||||||
import "../../components/demo-black-white-row";
|
import "../../components/demo-black-white-row";
|
||||||
|
import { DeviceRegistryEntry } from "../../../../src/data/device_registry";
|
||||||
|
|
||||||
const ENTITIES = [
|
const ENTITIES = [
|
||||||
getEntity("alarm_control_panel", "alarm", "disarmed", {
|
getEntity("alarm_control_panel", "alarm", "disarmed", {
|
||||||
@ -41,7 +42,7 @@ const ENTITIES = [
|
|||||||
}),
|
}),
|
||||||
];
|
];
|
||||||
|
|
||||||
const DEVICES = [
|
const DEVICES: DeviceRegistryEntry[] = [
|
||||||
{
|
{
|
||||||
area_id: "bedroom",
|
area_id: "bedroom",
|
||||||
configuration_url: null,
|
configuration_url: null,
|
||||||
@ -61,6 +62,8 @@ const DEVICES = [
|
|||||||
via_device_id: null,
|
via_device_id: null,
|
||||||
serial_number: null,
|
serial_number: null,
|
||||||
labels: [],
|
labels: [],
|
||||||
|
created_at: 0,
|
||||||
|
modified_at: 0,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
area_id: "backyard",
|
area_id: "backyard",
|
||||||
@ -81,6 +84,8 @@ const DEVICES = [
|
|||||||
via_device_id: null,
|
via_device_id: null,
|
||||||
serial_number: null,
|
serial_number: null,
|
||||||
labels: [],
|
labels: [],
|
||||||
|
created_at: 0,
|
||||||
|
modified_at: 0,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
area_id: null,
|
area_id: null,
|
||||||
@ -101,6 +106,8 @@ const DEVICES = [
|
|||||||
via_device_id: null,
|
via_device_id: null,
|
||||||
serial_number: null,
|
serial_number: null,
|
||||||
labels: [],
|
labels: [],
|
||||||
|
created_at: 0,
|
||||||
|
modified_at: 0,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -113,6 +120,8 @@ const AREAS: AreaRegistryEntry[] = [
|
|||||||
picture: null,
|
picture: null,
|
||||||
aliases: [],
|
aliases: [],
|
||||||
labels: [],
|
labels: [],
|
||||||
|
created_at: 0,
|
||||||
|
modified_at: 0,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
area_id: "bedroom",
|
area_id: "bedroom",
|
||||||
@ -122,6 +131,8 @@ const AREAS: AreaRegistryEntry[] = [
|
|||||||
picture: null,
|
picture: null,
|
||||||
aliases: [],
|
aliases: [],
|
||||||
labels: [],
|
labels: [],
|
||||||
|
created_at: 0,
|
||||||
|
modified_at: 0,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
area_id: "livingroom",
|
area_id: "livingroom",
|
||||||
@ -131,6 +142,8 @@ const AREAS: AreaRegistryEntry[] = [
|
|||||||
picture: null,
|
picture: null,
|
||||||
aliases: [],
|
aliases: [],
|
||||||
labels: [],
|
labels: [],
|
||||||
|
created_at: 0,
|
||||||
|
modified_at: 0,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@ import { FloorRegistryEntry } from "../../../../src/data/floor_registry";
|
|||||||
import { LabelRegistryEntry } from "../../../../src/data/label_registry";
|
import { LabelRegistryEntry } from "../../../../src/data/label_registry";
|
||||||
import { mockFloorRegistry } from "../../../../demo/src/stubs/floor_registry";
|
import { mockFloorRegistry } from "../../../../demo/src/stubs/floor_registry";
|
||||||
import { mockLabelRegistry } from "../../../../demo/src/stubs/label_registry";
|
import { mockLabelRegistry } from "../../../../demo/src/stubs/label_registry";
|
||||||
|
import { DeviceRegistryEntry } from "../../../../src/data/device_registry";
|
||||||
|
|
||||||
const ENTITIES = [
|
const ENTITIES = [
|
||||||
getEntity("alarm_control_panel", "alarm", "disarmed", {
|
getEntity("alarm_control_panel", "alarm", "disarmed", {
|
||||||
@ -41,7 +42,7 @@ const ENTITIES = [
|
|||||||
}),
|
}),
|
||||||
];
|
];
|
||||||
|
|
||||||
const DEVICES = [
|
const DEVICES: DeviceRegistryEntry[] = [
|
||||||
{
|
{
|
||||||
area_id: "bedroom",
|
area_id: "bedroom",
|
||||||
configuration_url: null,
|
configuration_url: null,
|
||||||
@ -61,6 +62,8 @@ const DEVICES = [
|
|||||||
via_device_id: null,
|
via_device_id: null,
|
||||||
serial_number: null,
|
serial_number: null,
|
||||||
labels: [],
|
labels: [],
|
||||||
|
created_at: 0,
|
||||||
|
modified_at: 0,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
area_id: "backyard",
|
area_id: "backyard",
|
||||||
@ -81,6 +84,8 @@ const DEVICES = [
|
|||||||
via_device_id: null,
|
via_device_id: null,
|
||||||
serial_number: null,
|
serial_number: null,
|
||||||
labels: [],
|
labels: [],
|
||||||
|
created_at: 0,
|
||||||
|
modified_at: 0,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
area_id: null,
|
area_id: null,
|
||||||
@ -101,6 +106,8 @@ const DEVICES = [
|
|||||||
via_device_id: null,
|
via_device_id: null,
|
||||||
serial_number: null,
|
serial_number: null,
|
||||||
labels: [],
|
labels: [],
|
||||||
|
created_at: 0,
|
||||||
|
modified_at: 0,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -113,6 +120,8 @@ const AREAS: AreaRegistryEntry[] = [
|
|||||||
picture: null,
|
picture: null,
|
||||||
aliases: [],
|
aliases: [],
|
||||||
labels: [],
|
labels: [],
|
||||||
|
created_at: 0,
|
||||||
|
modified_at: 0,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
area_id: "bedroom",
|
area_id: "bedroom",
|
||||||
@ -122,6 +131,8 @@ const AREAS: AreaRegistryEntry[] = [
|
|||||||
picture: null,
|
picture: null,
|
||||||
aliases: [],
|
aliases: [],
|
||||||
labels: [],
|
labels: [],
|
||||||
|
created_at: 0,
|
||||||
|
modified_at: 0,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
area_id: "livingroom",
|
area_id: "livingroom",
|
||||||
@ -131,6 +142,8 @@ const AREAS: AreaRegistryEntry[] = [
|
|||||||
picture: null,
|
picture: null,
|
||||||
aliases: [],
|
aliases: [],
|
||||||
labels: [],
|
labels: [],
|
||||||
|
created_at: 0,
|
||||||
|
modified_at: 0,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -141,6 +154,8 @@ const FLOORS: FloorRegistryEntry[] = [
|
|||||||
level: 0,
|
level: 0,
|
||||||
icon: null,
|
icon: null,
|
||||||
aliases: [],
|
aliases: [],
|
||||||
|
created_at: 0,
|
||||||
|
modified_at: 0,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
floor_id: "first",
|
floor_id: "first",
|
||||||
@ -148,6 +163,8 @@ const FLOORS: FloorRegistryEntry[] = [
|
|||||||
level: 1,
|
level: 1,
|
||||||
icon: "mdi:numeric-1",
|
icon: "mdi:numeric-1",
|
||||||
aliases: [],
|
aliases: [],
|
||||||
|
created_at: 0,
|
||||||
|
modified_at: 0,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
floor_id: "second",
|
floor_id: "second",
|
||||||
@ -155,6 +172,8 @@ const FLOORS: FloorRegistryEntry[] = [
|
|||||||
level: 2,
|
level: 2,
|
||||||
icon: "mdi:numeric-2",
|
icon: "mdi:numeric-2",
|
||||||
aliases: [],
|
aliases: [],
|
||||||
|
created_at: 0,
|
||||||
|
modified_at: 0,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -165,6 +184,8 @@ const LABELS: LabelRegistryEntry[] = [
|
|||||||
icon: null,
|
icon: null,
|
||||||
color: "yellow",
|
color: "yellow",
|
||||||
description: null,
|
description: null,
|
||||||
|
created_at: 0,
|
||||||
|
modified_at: 0,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label_id: "entertainment",
|
label_id: "entertainment",
|
||||||
@ -172,6 +193,8 @@ const LABELS: LabelRegistryEntry[] = [
|
|||||||
icon: "mdi:popcorn",
|
icon: "mdi:popcorn",
|
||||||
color: "blue",
|
color: "blue",
|
||||||
description: null,
|
description: null,
|
||||||
|
created_at: 0,
|
||||||
|
modified_at: 0,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -358,13 +358,11 @@ export class DemoEntityState extends LitElement {
|
|||||||
},
|
},
|
||||||
entity_id: {
|
entity_id: {
|
||||||
title: "Entity ID",
|
title: "Entity ID",
|
||||||
width: "30%",
|
|
||||||
filterable: true,
|
filterable: true,
|
||||||
sortable: true,
|
sortable: true,
|
||||||
},
|
},
|
||||||
state: {
|
state: {
|
||||||
title: "State",
|
title: "State",
|
||||||
width: "20%",
|
|
||||||
sortable: true,
|
sortable: true,
|
||||||
template: (entry) =>
|
template: (entry) =>
|
||||||
html`${computeStateDisplay(
|
html`${computeStateDisplay(
|
||||||
@ -379,14 +377,12 @@ export class DemoEntityState extends LitElement {
|
|||||||
device_class: {
|
device_class: {
|
||||||
title: "Device class",
|
title: "Device class",
|
||||||
template: (entry) => html`${entry.device_class ?? "-"}`,
|
template: (entry) => html`${entry.device_class ?? "-"}`,
|
||||||
width: "20%",
|
|
||||||
filterable: true,
|
filterable: true,
|
||||||
sortable: true,
|
sortable: true,
|
||||||
},
|
},
|
||||||
domain: {
|
domain: {
|
||||||
title: "Domain",
|
title: "Domain",
|
||||||
template: (entry) => html`${computeDomain(entry.entity_id)}`,
|
template: (entry) => html`${computeDomain(entry.entity_id)}`,
|
||||||
width: "20%",
|
|
||||||
filterable: true,
|
filterable: true,
|
||||||
sortable: true,
|
sortable: true,
|
||||||
},
|
},
|
||||||
|
@ -203,6 +203,8 @@ const createEntityRegistryEntries = (
|
|||||||
options: null,
|
options: null,
|
||||||
labels: [],
|
labels: [],
|
||||||
categories: {},
|
categories: {},
|
||||||
|
created_at: 0,
|
||||||
|
modified_at: 0,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -228,6 +230,8 @@ const createDeviceRegistryEntries = (
|
|||||||
disabled_by: null,
|
disabled_by: null,
|
||||||
configuration_url: null,
|
configuration_url: null,
|
||||||
labels: [],
|
labels: [],
|
||||||
|
created_at: 0,
|
||||||
|
modified_at: 0,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -127,14 +127,13 @@ export class HassioBackups extends LitElement {
|
|||||||
main: true,
|
main: true,
|
||||||
sortable: true,
|
sortable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
grows: true,
|
flex: 2,
|
||||||
template: (backup) =>
|
template: (backup) =>
|
||||||
html`${backup.name || backup.slug}
|
html`${backup.name || backup.slug}
|
||||||
<div class="secondary">${backup.secondary}</div>`,
|
<div class="secondary">${backup.secondary}</div>`,
|
||||||
},
|
},
|
||||||
size: {
|
size: {
|
||||||
title: this.supervisor.localize("backup.size"),
|
title: this.supervisor.localize("backup.size"),
|
||||||
width: "15%",
|
|
||||||
hidden: narrow,
|
hidden: narrow,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
sortable: true,
|
sortable: true,
|
||||||
@ -142,7 +141,6 @@ export class HassioBackups extends LitElement {
|
|||||||
},
|
},
|
||||||
location: {
|
location: {
|
||||||
title: this.supervisor.localize("backup.location"),
|
title: this.supervisor.localize("backup.location"),
|
||||||
width: "15%",
|
|
||||||
hidden: narrow,
|
hidden: narrow,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
sortable: true,
|
sortable: true,
|
||||||
@ -151,7 +149,6 @@ export class HassioBackups extends LitElement {
|
|||||||
},
|
},
|
||||||
date: {
|
date: {
|
||||||
title: this.supervisor.localize("backup.created"),
|
title: this.supervisor.localize("backup.created"),
|
||||||
width: "15%",
|
|
||||||
direction: "desc",
|
direction: "desc",
|
||||||
hidden: narrow,
|
hidden: narrow,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
|
@ -85,9 +85,9 @@ export interface DataTableColumnData<T = any> extends DataTableSortColumnData {
|
|||||||
| "flex";
|
| "flex";
|
||||||
template?: (row: T) => TemplateResult | string | typeof nothing;
|
template?: (row: T) => TemplateResult | string | typeof nothing;
|
||||||
extraTemplate?: (row: T) => TemplateResult | string | typeof nothing;
|
extraTemplate?: (row: T) => TemplateResult | string | typeof nothing;
|
||||||
width?: string;
|
minWidth?: string;
|
||||||
maxWidth?: string;
|
maxWidth?: string;
|
||||||
grows?: boolean;
|
flex?: number;
|
||||||
forceLTR?: boolean;
|
forceLTR?: boolean;
|
||||||
hidden?: boolean;
|
hidden?: boolean;
|
||||||
}
|
}
|
||||||
@ -216,6 +216,18 @@ export class HaDataTable extends LitElement {
|
|||||||
this.updateComplete.then(() => this._calcTableHeight());
|
this.updateComplete.then(() => this._calcTableHeight());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected updated() {
|
||||||
|
const header = this.renderRoot.querySelector(".mdc-data-table__header-row");
|
||||||
|
if (!header) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (header.scrollWidth > header.clientWidth) {
|
||||||
|
this.style.setProperty("--table-row-width", `${header.scrollWidth}px`);
|
||||||
|
} else {
|
||||||
|
this.style.removeProperty("--table-row-width");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public willUpdate(properties: PropertyValues) {
|
public willUpdate(properties: PropertyValues) {
|
||||||
super.willUpdate(properties);
|
super.willUpdate(properties);
|
||||||
|
|
||||||
@ -355,7 +367,12 @@ export class HaDataTable extends LitElement {
|
|||||||
: `calc(100% - ${this._headerHeight}px)`,
|
: `calc(100% - ${this._headerHeight}px)`,
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
<div class="mdc-data-table__header-row" role="row" aria-rowindex="1">
|
<div
|
||||||
|
class="mdc-data-table__header-row"
|
||||||
|
role="row"
|
||||||
|
aria-rowindex="1"
|
||||||
|
@scroll=${this._scrollContent}
|
||||||
|
>
|
||||||
<slot name="header-row">
|
<slot name="header-row">
|
||||||
${this.selectable
|
${this.selectable
|
||||||
? html`
|
? html`
|
||||||
@ -398,18 +415,16 @@ export class HaDataTable extends LitElement {
|
|||||||
column.type === "overflow",
|
column.type === "overflow",
|
||||||
sortable: Boolean(column.sortable),
|
sortable: Boolean(column.sortable),
|
||||||
"not-sorted": Boolean(column.sortable && !sorted),
|
"not-sorted": Boolean(column.sortable && !sorted),
|
||||||
grows: Boolean(column.grows),
|
|
||||||
};
|
};
|
||||||
return html`
|
return html`
|
||||||
<div
|
<div
|
||||||
aria-label=${ifDefined(column.label)}
|
aria-label=${ifDefined(column.label)}
|
||||||
class="mdc-data-table__header-cell ${classMap(classes)}"
|
class="mdc-data-table__header-cell ${classMap(classes)}"
|
||||||
style=${column.width
|
style=${styleMap({
|
||||||
? styleMap({
|
minWidth: column.minWidth,
|
||||||
[column.grows ? "minWidth" : "width"]: column.width,
|
maxWidth: column.maxWidth,
|
||||||
maxWidth: column.maxWidth || "",
|
flex: column.flex || 1,
|
||||||
})
|
})}
|
||||||
: ""}
|
|
||||||
role="columnheader"
|
role="columnheader"
|
||||||
aria-sort=${ifDefined(
|
aria-sort=${ifDefined(
|
||||||
sorted
|
sorted
|
||||||
@ -538,15 +553,13 @@ export class HaDataTable extends LitElement {
|
|||||||
"mdc-data-table__cell--overflow-menu":
|
"mdc-data-table__cell--overflow-menu":
|
||||||
column.type === "overflow-menu",
|
column.type === "overflow-menu",
|
||||||
"mdc-data-table__cell--overflow": column.type === "overflow",
|
"mdc-data-table__cell--overflow": column.type === "overflow",
|
||||||
grows: Boolean(column.grows),
|
|
||||||
forceLTR: Boolean(column.forceLTR),
|
forceLTR: Boolean(column.forceLTR),
|
||||||
})}"
|
})}"
|
||||||
style=${column.width
|
style=${styleMap({
|
||||||
? styleMap({
|
minWidth: column.minWidth,
|
||||||
[column.grows ? "minWidth" : "width"]: column.width,
|
maxWidth: column.maxWidth,
|
||||||
maxWidth: column.maxWidth ? column.maxWidth : "",
|
flex: column.flex || 1,
|
||||||
})
|
})}
|
||||||
: ""}
|
|
||||||
>
|
>
|
||||||
${column.template
|
${column.template
|
||||||
? column.template(row)
|
? column.template(row)
|
||||||
@ -815,6 +828,17 @@ export class HaDataTable extends LitElement {
|
|||||||
@eventOptions({ passive: true })
|
@eventOptions({ passive: true })
|
||||||
private _saveScrollPos(e: Event) {
|
private _saveScrollPos(e: Event) {
|
||||||
this._savedScrollPos = (e.target as HTMLDivElement).scrollTop;
|
this._savedScrollPos = (e.target as HTMLDivElement).scrollTop;
|
||||||
|
|
||||||
|
this.renderRoot.querySelector(".mdc-data-table__header-row")!.scrollLeft = (
|
||||||
|
e.target as HTMLDivElement
|
||||||
|
).scrollLeft;
|
||||||
|
}
|
||||||
|
|
||||||
|
@eventOptions({ passive: true })
|
||||||
|
private _scrollContent(e: Event) {
|
||||||
|
this.renderRoot.querySelector("lit-virtualizer")!.scrollLeft = (
|
||||||
|
e.target as HTMLDivElement
|
||||||
|
).scrollLeft;
|
||||||
}
|
}
|
||||||
|
|
||||||
private _collapseGroup = (ev: Event) => {
|
private _collapseGroup = (ev: Event) => {
|
||||||
@ -889,8 +913,8 @@ export class HaDataTable extends LitElement {
|
|||||||
|
|
||||||
.mdc-data-table__row {
|
.mdc-data-table__row {
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 100%;
|
|
||||||
height: var(--data-table-row-height, 52px);
|
height: var(--data-table-row-height, 52px);
|
||||||
|
width: var(--table-row-width, 100%);
|
||||||
}
|
}
|
||||||
|
|
||||||
.mdc-data-table__row ~ .mdc-data-table__row {
|
.mdc-data-table__row ~ .mdc-data-table__row {
|
||||||
@ -914,18 +938,26 @@ export class HaDataTable extends LitElement {
|
|||||||
.mdc-data-table__header-row {
|
.mdc-data-table__header-row {
|
||||||
height: 56px;
|
height: 56px;
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 100%;
|
|
||||||
border-bottom: 1px solid var(--divider-color);
|
border-bottom: 1px solid var(--divider-color);
|
||||||
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Hide scrollbar for Chrome, Safari and Opera */
|
||||||
.mdc-data-table__header-row::-webkit-scrollbar {
|
.mdc-data-table__header-row::-webkit-scrollbar {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Hide scrollbar for IE, Edge and Firefox */
|
||||||
|
.mdc-data-table__header-row {
|
||||||
|
-ms-overflow-style: none; /* IE and Edge */
|
||||||
|
scrollbar-width: none; /* Firefox */
|
||||||
|
}
|
||||||
|
|
||||||
.mdc-data-table__cell,
|
.mdc-data-table__cell,
|
||||||
.mdc-data-table__header-cell {
|
.mdc-data-table__header-cell {
|
||||||
padding-right: 16px;
|
padding-right: 16px;
|
||||||
padding-left: 16px;
|
padding-left: 16px;
|
||||||
|
min-width: 150px;
|
||||||
align-self: center;
|
align-self: center;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
@ -973,6 +1005,8 @@ export class HaDataTable extends LitElement {
|
|||||||
letter-spacing: 0.0178571429em;
|
letter-spacing: 0.0178571429em;
|
||||||
text-decoration: inherit;
|
text-decoration: inherit;
|
||||||
text-transform: inherit;
|
text-transform: inherit;
|
||||||
|
flex-grow: 0;
|
||||||
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mdc-data-table__cell a {
|
.mdc-data-table__cell a {
|
||||||
@ -991,7 +1025,8 @@ export class HaDataTable extends LitElement {
|
|||||||
|
|
||||||
.mdc-data-table__header-cell--icon,
|
.mdc-data-table__header-cell--icon,
|
||||||
.mdc-data-table__cell--icon {
|
.mdc-data-table__cell--icon {
|
||||||
width: 54px;
|
min-width: 64px;
|
||||||
|
flex: 0 0 64px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mdc-data-table__cell--icon img {
|
.mdc-data-table__cell--icon img {
|
||||||
@ -1031,11 +1066,14 @@ export class HaDataTable extends LitElement {
|
|||||||
.mdc-data-table__header-cell--overflow-menu,
|
.mdc-data-table__header-cell--overflow-menu,
|
||||||
.mdc-data-table__header-cell--icon-button,
|
.mdc-data-table__header-cell--icon-button,
|
||||||
.mdc-data-table__cell--icon-button {
|
.mdc-data-table__cell--icon-button {
|
||||||
|
min-width: 64px;
|
||||||
|
flex: 0 0 64px !important;
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mdc-data-table__header-cell--icon-button,
|
.mdc-data-table__header-cell--icon-button,
|
||||||
.mdc-data-table__cell--icon-button {
|
.mdc-data-table__cell--icon-button {
|
||||||
|
min-width: 56px;
|
||||||
width: 56px;
|
width: 56px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -279,6 +279,8 @@ export class HaAreaPicker extends LitElement {
|
|||||||
icon: null,
|
icon: null,
|
||||||
aliases: [],
|
aliases: [],
|
||||||
labels: [],
|
labels: [],
|
||||||
|
created_at: 0,
|
||||||
|
modified_at: 0,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@ -295,6 +297,8 @@ export class HaAreaPicker extends LitElement {
|
|||||||
icon: "mdi:plus",
|
icon: "mdi:plus",
|
||||||
aliases: [],
|
aliases: [],
|
||||||
labels: [],
|
labels: [],
|
||||||
|
created_at: 0,
|
||||||
|
modified_at: 0,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@ -377,6 +381,8 @@ export class HaAreaPicker extends LitElement {
|
|||||||
picture: null,
|
picture: null,
|
||||||
labels: [],
|
labels: [],
|
||||||
aliases: [],
|
aliases: [],
|
||||||
|
created_at: 0,
|
||||||
|
modified_at: 0,
|
||||||
},
|
},
|
||||||
] as AreaRegistryEntry[];
|
] as AreaRegistryEntry[];
|
||||||
} else {
|
} else {
|
||||||
@ -393,6 +399,8 @@ export class HaAreaPicker extends LitElement {
|
|||||||
picture: null,
|
picture: null,
|
||||||
labels: [],
|
labels: [],
|
||||||
aliases: [],
|
aliases: [],
|
||||||
|
created_at: 0,
|
||||||
|
modified_at: 0,
|
||||||
},
|
},
|
||||||
] as AreaRegistryEntry[];
|
] as AreaRegistryEntry[];
|
||||||
}
|
}
|
||||||
|
@ -295,6 +295,8 @@ export class HaFloorPicker extends SubscribeMixin(LitElement) {
|
|||||||
icon: null,
|
icon: null,
|
||||||
level: null,
|
level: null,
|
||||||
aliases: [],
|
aliases: [],
|
||||||
|
created_at: 0,
|
||||||
|
modified_at: 0,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@ -309,6 +311,8 @@ export class HaFloorPicker extends SubscribeMixin(LitElement) {
|
|||||||
icon: "mdi:plus",
|
icon: "mdi:plus",
|
||||||
level: null,
|
level: null,
|
||||||
aliases: [],
|
aliases: [],
|
||||||
|
created_at: 0,
|
||||||
|
modified_at: 0,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@ -391,6 +395,8 @@ export class HaFloorPicker extends SubscribeMixin(LitElement) {
|
|||||||
icon: null,
|
icon: null,
|
||||||
level: null,
|
level: null,
|
||||||
aliases: [],
|
aliases: [],
|
||||||
|
created_at: 0,
|
||||||
|
modified_at: 0,
|
||||||
},
|
},
|
||||||
] as FloorRegistryEntry[];
|
] as FloorRegistryEntry[];
|
||||||
} else {
|
} else {
|
||||||
@ -405,6 +411,8 @@ export class HaFloorPicker extends SubscribeMixin(LitElement) {
|
|||||||
icon: "mdi:plus",
|
icon: "mdi:plus",
|
||||||
level: null,
|
level: null,
|
||||||
aliases: [],
|
aliases: [],
|
||||||
|
created_at: 0,
|
||||||
|
modified_at: 0,
|
||||||
},
|
},
|
||||||
] as FloorRegistryEntry[];
|
] as FloorRegistryEntry[];
|
||||||
}
|
}
|
||||||
|
@ -303,6 +303,8 @@ export class HaLabelPicker extends SubscribeMixin(LitElement) {
|
|||||||
icon: null,
|
icon: null,
|
||||||
color: null,
|
color: null,
|
||||||
description: null,
|
description: null,
|
||||||
|
created_at: 0,
|
||||||
|
modified_at: 0,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@ -317,6 +319,8 @@ export class HaLabelPicker extends SubscribeMixin(LitElement) {
|
|||||||
icon: "mdi:plus",
|
icon: "mdi:plus",
|
||||||
color: null,
|
color: null,
|
||||||
description: null,
|
description: null,
|
||||||
|
created_at: 0,
|
||||||
|
modified_at: 0,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -2,10 +2,11 @@ import { stringCompare } from "../common/string/compare";
|
|||||||
import { HomeAssistant } from "../types";
|
import { HomeAssistant } from "../types";
|
||||||
import { DeviceRegistryEntry } from "./device_registry";
|
import { DeviceRegistryEntry } from "./device_registry";
|
||||||
import { EntityRegistryEntry } from "./entity_registry";
|
import { EntityRegistryEntry } from "./entity_registry";
|
||||||
|
import { RegistryEntry } from "./registry";
|
||||||
|
|
||||||
export { subscribeAreaRegistry } from "./ws-area_registry";
|
export { subscribeAreaRegistry } from "./ws-area_registry";
|
||||||
|
|
||||||
export interface AreaRegistryEntry {
|
export interface AreaRegistryEntry extends RegistryEntry {
|
||||||
area_id: string;
|
area_id: string;
|
||||||
floor_id: string | null;
|
floor_id: string | null;
|
||||||
name: string;
|
name: string;
|
||||||
|
@ -1,19 +1,20 @@
|
|||||||
import { computeStateName } from "../common/entity/compute_state_name";
|
import { computeStateName } from "../common/entity/compute_state_name";
|
||||||
import { caseInsensitiveStringCompare } from "../common/string/compare";
|
import { caseInsensitiveStringCompare } from "../common/string/compare";
|
||||||
import type { HomeAssistant } from "../types";
|
import type { HomeAssistant } from "../types";
|
||||||
|
import { ConfigEntry } from "./config_entries";
|
||||||
import type {
|
import type {
|
||||||
EntityRegistryDisplayEntry,
|
EntityRegistryDisplayEntry,
|
||||||
EntityRegistryEntry,
|
EntityRegistryEntry,
|
||||||
} from "./entity_registry";
|
} from "./entity_registry";
|
||||||
import { ConfigEntry } from "./config_entries";
|
|
||||||
import type { EntitySources } from "./entity_sources";
|
import type { EntitySources } from "./entity_sources";
|
||||||
|
import { RegistryEntry } from "./registry";
|
||||||
|
|
||||||
export {
|
export {
|
||||||
fetchDeviceRegistry,
|
fetchDeviceRegistry,
|
||||||
subscribeDeviceRegistry,
|
subscribeDeviceRegistry,
|
||||||
} from "./ws-device_registry";
|
} from "./ws-device_registry";
|
||||||
|
|
||||||
export interface DeviceRegistryEntry {
|
export interface DeviceRegistryEntry extends RegistryEntry {
|
||||||
id: string;
|
id: string;
|
||||||
config_entries: string[];
|
config_entries: string[];
|
||||||
connections: Array<[string, string]>;
|
connections: Array<[string, string]>;
|
||||||
|
@ -7,6 +7,7 @@ import { debounce } from "../common/util/debounce";
|
|||||||
import { HomeAssistant } from "../types";
|
import { HomeAssistant } from "../types";
|
||||||
import { LightColor } from "./light";
|
import { LightColor } from "./light";
|
||||||
import { computeDomain } from "../common/entity/compute_domain";
|
import { computeDomain } from "../common/entity/compute_domain";
|
||||||
|
import { RegistryEntry } from "./registry";
|
||||||
|
|
||||||
export { subscribeEntityRegistryDisplay } from "./ws-entity_registry_display";
|
export { subscribeEntityRegistryDisplay } from "./ws-entity_registry_display";
|
||||||
|
|
||||||
@ -43,7 +44,7 @@ export interface EntityRegistryDisplayEntryResponse {
|
|||||||
entity_categories: Record<number, EntityCategory>;
|
entity_categories: Record<number, EntityCategory>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface EntityRegistryEntry {
|
export interface EntityRegistryEntry extends RegistryEntry {
|
||||||
id: string;
|
id: string;
|
||||||
entity_id: string;
|
entity_id: string;
|
||||||
name: string | null;
|
name: string | null;
|
||||||
|
@ -4,10 +4,11 @@ import { stringCompare } from "../common/string/compare";
|
|||||||
import { debounce } from "../common/util/debounce";
|
import { debounce } from "../common/util/debounce";
|
||||||
import { HomeAssistant } from "../types";
|
import { HomeAssistant } from "../types";
|
||||||
import { AreaRegistryEntry } from "./area_registry";
|
import { AreaRegistryEntry } from "./area_registry";
|
||||||
|
import { RegistryEntry } from "./registry";
|
||||||
|
|
||||||
export { subscribeAreaRegistry } from "./ws-area_registry";
|
export { subscribeAreaRegistry } from "./ws-area_registry";
|
||||||
|
|
||||||
export interface FloorRegistryEntry {
|
export interface FloorRegistryEntry extends RegistryEntry {
|
||||||
floor_id: string;
|
floor_id: string;
|
||||||
name: string;
|
name: string;
|
||||||
level: number | null;
|
level: number | null;
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
import { Connection, createCollection } from "home-assistant-js-websocket";
|
import { Connection, createCollection } from "home-assistant-js-websocket";
|
||||||
import { Store } from "home-assistant-js-websocket/dist/store";
|
import { Store } from "home-assistant-js-websocket/dist/store";
|
||||||
import { stringCompare } from "../common/string/compare";
|
import { stringCompare } from "../common/string/compare";
|
||||||
import { HomeAssistant } from "../types";
|
|
||||||
import { debounce } from "../common/util/debounce";
|
import { debounce } from "../common/util/debounce";
|
||||||
|
import { HomeAssistant } from "../types";
|
||||||
|
import { RegistryEntry } from "./registry";
|
||||||
|
|
||||||
export interface LabelRegistryEntry {
|
export interface LabelRegistryEntry extends RegistryEntry {
|
||||||
label_id: string;
|
label_id: string;
|
||||||
name: string;
|
name: string;
|
||||||
icon: string | null;
|
icon: string | null;
|
||||||
|
4
src/data/registry.ts
Normal file
4
src/data/registry.ts
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
export interface RegistryEntry {
|
||||||
|
created_at: number;
|
||||||
|
modified_at: number;
|
||||||
|
}
|
@ -87,14 +87,13 @@ export class HaConfigApplicationCredentials extends LitElement {
|
|||||||
sortable: true,
|
sortable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
direction: "asc",
|
direction: "asc",
|
||||||
grows: true,
|
flex: 2,
|
||||||
},
|
},
|
||||||
client_id: {
|
client_id: {
|
||||||
title: localize(
|
title: localize(
|
||||||
"ui.panel.config.application_credentials.picker.headers.client_id"
|
"ui.panel.config.application_credentials.picker.headers.client_id"
|
||||||
),
|
),
|
||||||
filterable: true,
|
filterable: true,
|
||||||
width: "30%",
|
|
||||||
},
|
},
|
||||||
localizedDomain: {
|
localizedDomain: {
|
||||||
title: localize(
|
title: localize(
|
||||||
@ -102,12 +101,10 @@ export class HaConfigApplicationCredentials extends LitElement {
|
|||||||
),
|
),
|
||||||
sortable: true,
|
sortable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
width: "30%",
|
|
||||||
direction: "asc",
|
direction: "asc",
|
||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
title: "",
|
title: "",
|
||||||
width: "64px",
|
|
||||||
type: "overflow-menu",
|
type: "overflow-menu",
|
||||||
showNarrow: true,
|
showNarrow: true,
|
||||||
hideable: false,
|
hideable: false,
|
||||||
|
@ -288,7 +288,7 @@ class HaAutomationPicker extends SubscribeMixin(LitElement) {
|
|||||||
sortable: true,
|
sortable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
direction: "asc",
|
direction: "asc",
|
||||||
grows: true,
|
flex: 2,
|
||||||
extraTemplate: (automation) =>
|
extraTemplate: (automation) =>
|
||||||
automation.labels.length
|
automation.labels.length
|
||||||
? html`<ha-data-table-labels
|
? html`<ha-data-table-labels
|
||||||
@ -320,7 +320,6 @@ class HaAutomationPicker extends SubscribeMixin(LitElement) {
|
|||||||
},
|
},
|
||||||
last_triggered: {
|
last_triggered: {
|
||||||
sortable: true,
|
sortable: true,
|
||||||
width: "130px",
|
|
||||||
title: localize("ui.card.automation.last_triggered"),
|
title: localize("ui.card.automation.last_triggered"),
|
||||||
template: (automation) => {
|
template: (automation) => {
|
||||||
if (!automation.last_triggered) {
|
if (!automation.last_triggered) {
|
||||||
@ -337,7 +336,8 @@ class HaAutomationPicker extends SubscribeMixin(LitElement) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
formatted_state: {
|
formatted_state: {
|
||||||
width: "82px",
|
minWidth: "82px",
|
||||||
|
maxWidth: "82px",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
groupable: true,
|
groupable: true,
|
||||||
hidden: narrow,
|
hidden: narrow,
|
||||||
@ -353,7 +353,6 @@ class HaAutomationPicker extends SubscribeMixin(LitElement) {
|
|||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
title: "",
|
title: "",
|
||||||
width: "64px",
|
|
||||||
type: "icon-button",
|
type: "icon-button",
|
||||||
showNarrow: true,
|
showNarrow: true,
|
||||||
moveable: false,
|
moveable: false,
|
||||||
|
@ -59,7 +59,7 @@ class HaConfigBackup extends LitElement {
|
|||||||
main: true,
|
main: true,
|
||||||
sortable: true,
|
sortable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
grows: true,
|
flex: 2,
|
||||||
template: narrow
|
template: narrow
|
||||||
? undefined
|
? undefined
|
||||||
: (backup) =>
|
: (backup) =>
|
||||||
@ -72,14 +72,12 @@ class HaConfigBackup extends LitElement {
|
|||||||
},
|
},
|
||||||
size: {
|
size: {
|
||||||
title: localize("ui.panel.config.backup.size"),
|
title: localize("ui.panel.config.backup.size"),
|
||||||
width: "15%",
|
|
||||||
filterable: true,
|
filterable: true,
|
||||||
sortable: true,
|
sortable: true,
|
||||||
template: (backup) => Math.ceil(backup.size * 10) / 10 + " MB",
|
template: (backup) => Math.ceil(backup.size * 10) / 10 + " MB",
|
||||||
},
|
},
|
||||||
date: {
|
date: {
|
||||||
title: localize("ui.panel.config.backup.created"),
|
title: localize("ui.panel.config.backup.created"),
|
||||||
width: "15%",
|
|
||||||
direction: "desc",
|
direction: "desc",
|
||||||
filterable: true,
|
filterable: true,
|
||||||
sortable: true,
|
sortable: true,
|
||||||
@ -89,7 +87,6 @@ class HaConfigBackup extends LitElement {
|
|||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
title: "",
|
title: "",
|
||||||
width: "15%",
|
|
||||||
type: "overflow-menu",
|
type: "overflow-menu",
|
||||||
showNarrow: true,
|
showNarrow: true,
|
||||||
hideable: false,
|
hideable: false,
|
||||||
|
@ -176,7 +176,7 @@ class HaBlueprintOverview extends LitElement {
|
|||||||
sortable: true,
|
sortable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
direction: "asc",
|
direction: "asc",
|
||||||
grows: true,
|
flex: 2,
|
||||||
},
|
},
|
||||||
translated_type: {
|
translated_type: {
|
||||||
title: localize("ui.panel.config.blueprint.overview.headers.type"),
|
title: localize("ui.panel.config.blueprint.overview.headers.type"),
|
||||||
@ -184,14 +184,13 @@ class HaBlueprintOverview extends LitElement {
|
|||||||
filterable: true,
|
filterable: true,
|
||||||
groupable: true,
|
groupable: true,
|
||||||
direction: "asc",
|
direction: "asc",
|
||||||
width: "10%",
|
|
||||||
},
|
},
|
||||||
path: {
|
path: {
|
||||||
title: localize("ui.panel.config.blueprint.overview.headers.file_name"),
|
title: localize("ui.panel.config.blueprint.overview.headers.file_name"),
|
||||||
sortable: true,
|
sortable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
direction: "asc",
|
direction: "asc",
|
||||||
width: "25%",
|
flex: 2,
|
||||||
},
|
},
|
||||||
fullpath: {
|
fullpath: {
|
||||||
title: "fullpath",
|
title: "fullpath",
|
||||||
@ -199,7 +198,6 @@ class HaBlueprintOverview extends LitElement {
|
|||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
title: "",
|
title: "",
|
||||||
width: this.narrow ? undefined : "10%",
|
|
||||||
type: "overflow-menu",
|
type: "overflow-menu",
|
||||||
showNarrow: true,
|
showNarrow: true,
|
||||||
moveable: false,
|
moveable: false,
|
||||||
|
@ -22,6 +22,7 @@ import { UnsubscribeFunc } from "home-assistant-js-websocket";
|
|||||||
import { customElement, property, state } from "lit/decorators";
|
import { customElement, property, state } from "lit/decorators";
|
||||||
import memoizeOne from "memoize-one";
|
import memoizeOne from "memoize-one";
|
||||||
import { computeCssColor } from "../../../common/color/compute-color";
|
import { computeCssColor } from "../../../common/color/compute-color";
|
||||||
|
import { formatShortDateTime } from "../../../common/datetime/format_date_time";
|
||||||
import { storage } from "../../../common/decorators/storage";
|
import { storage } from "../../../common/decorators/storage";
|
||||||
import { HASSDomEvent } from "../../../common/dom/fire_event";
|
import { HASSDomEvent } from "../../../common/dom/fire_event";
|
||||||
import { computeStateDomain } from "../../../common/entity/compute_state_domain";
|
import { computeStateDomain } from "../../../common/entity/compute_state_domain";
|
||||||
@ -58,6 +59,11 @@ import "../../../components/ha-sub-menu";
|
|||||||
import { createAreaRegistryEntry } from "../../../data/area_registry";
|
import { createAreaRegistryEntry } from "../../../data/area_registry";
|
||||||
import { ConfigEntry, sortConfigEntries } from "../../../data/config_entries";
|
import { ConfigEntry, sortConfigEntries } from "../../../data/config_entries";
|
||||||
import { fullEntitiesContext } from "../../../data/context";
|
import { fullEntitiesContext } from "../../../data/context";
|
||||||
|
import {
|
||||||
|
DataTableFilters,
|
||||||
|
deserializeFilters,
|
||||||
|
serializeFilters,
|
||||||
|
} from "../../../data/data_table_filters";
|
||||||
import {
|
import {
|
||||||
DeviceEntityLookup,
|
DeviceEntityLookup,
|
||||||
DeviceRegistryEntry,
|
DeviceRegistryEntry,
|
||||||
@ -75,6 +81,7 @@ import {
|
|||||||
createLabelRegistryEntry,
|
createLabelRegistryEntry,
|
||||||
subscribeLabelRegistry,
|
subscribeLabelRegistry,
|
||||||
} from "../../../data/label_registry";
|
} from "../../../data/label_registry";
|
||||||
|
import { showAlertDialog } from "../../../dialogs/generic/show-dialog-box";
|
||||||
import "../../../layouts/hass-tabs-subpage-data-table";
|
import "../../../layouts/hass-tabs-subpage-data-table";
|
||||||
import { SubscribeMixin } from "../../../mixins/subscribe-mixin";
|
import { SubscribeMixin } from "../../../mixins/subscribe-mixin";
|
||||||
import { haStyle } from "../../../resources/styles";
|
import { haStyle } from "../../../resources/styles";
|
||||||
@ -85,12 +92,6 @@ import { configSections } from "../ha-panel-config";
|
|||||||
import "../integrations/ha-integration-overflow-menu";
|
import "../integrations/ha-integration-overflow-menu";
|
||||||
import { showAddIntegrationDialog } from "../integrations/show-add-integration-dialog";
|
import { showAddIntegrationDialog } from "../integrations/show-add-integration-dialog";
|
||||||
import { showLabelDetailDialog } from "../labels/show-dialog-label-detail";
|
import { showLabelDetailDialog } from "../labels/show-dialog-label-detail";
|
||||||
import { showAlertDialog } from "../../../dialogs/generic/show-dialog-box";
|
|
||||||
import {
|
|
||||||
serializeFilters,
|
|
||||||
deserializeFilters,
|
|
||||||
DataTableFilters,
|
|
||||||
} from "../../../data/data_table_filters";
|
|
||||||
|
|
||||||
interface DeviceRowData extends DeviceRegistryEntry {
|
interface DeviceRowData extends DeviceRegistryEntry {
|
||||||
device?: DeviceRowData;
|
device?: DeviceRowData;
|
||||||
@ -443,7 +444,7 @@ export class HaConfigDeviceDashboard extends SubscribeMixin(LitElement) {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
private _columns = memoizeOne((localize: LocalizeFunc, narrow: boolean) => {
|
private _columns = memoizeOne((localize: LocalizeFunc) => {
|
||||||
type DeviceItem = ReturnType<
|
type DeviceItem = ReturnType<
|
||||||
typeof this._devicesAndFilterDomains
|
typeof this._devicesAndFilterDomains
|
||||||
>["devicesOutput"][number];
|
>["devicesOutput"][number];
|
||||||
@ -476,6 +477,8 @@ export class HaConfigDeviceDashboard extends SubscribeMixin(LitElement) {
|
|||||||
filterable: true,
|
filterable: true,
|
||||||
direction: "asc",
|
direction: "asc",
|
||||||
grows: true,
|
grows: true,
|
||||||
|
flex: 2,
|
||||||
|
minWidth: "150px",
|
||||||
extraTemplate: (device) => html`
|
extraTemplate: (device) => html`
|
||||||
${device.label_entries.length
|
${device.label_entries.length
|
||||||
? html`
|
? html`
|
||||||
@ -491,27 +494,27 @@ export class HaConfigDeviceDashboard extends SubscribeMixin(LitElement) {
|
|||||||
sortable: true,
|
sortable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
groupable: true,
|
groupable: true,
|
||||||
width: "15%",
|
minWidth: "120px",
|
||||||
},
|
},
|
||||||
model: {
|
model: {
|
||||||
title: localize("ui.panel.config.devices.data_table.model"),
|
title: localize("ui.panel.config.devices.data_table.model"),
|
||||||
sortable: true,
|
sortable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
width: "15%",
|
minWidth: "120px",
|
||||||
},
|
},
|
||||||
area: {
|
area: {
|
||||||
title: localize("ui.panel.config.devices.data_table.area"),
|
title: localize("ui.panel.config.devices.data_table.area"),
|
||||||
sortable: true,
|
sortable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
groupable: true,
|
groupable: true,
|
||||||
width: "15%",
|
minWidth: "120px",
|
||||||
},
|
},
|
||||||
integration: {
|
integration: {
|
||||||
title: localize("ui.panel.config.devices.data_table.integration"),
|
title: localize("ui.panel.config.devices.data_table.integration"),
|
||||||
sortable: true,
|
sortable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
groupable: true,
|
groupable: true,
|
||||||
width: "15%",
|
minWidth: "120px",
|
||||||
},
|
},
|
||||||
battery_entity: {
|
battery_entity: {
|
||||||
title: localize("ui.panel.config.devices.data_table.battery"),
|
title: localize("ui.panel.config.devices.data_table.battery"),
|
||||||
@ -519,8 +522,8 @@ export class HaConfigDeviceDashboard extends SubscribeMixin(LitElement) {
|
|||||||
sortable: true,
|
sortable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
type: "numeric",
|
type: "numeric",
|
||||||
width: narrow ? "105px" : "15%",
|
maxWidth: "101px",
|
||||||
maxWidth: "105px",
|
minWidth: "101px",
|
||||||
valueColumn: "battery_level",
|
valueColumn: "battery_level",
|
||||||
template: (device) => {
|
template: (device) => {
|
||||||
const batteryEntityPair = device.battery_entity;
|
const batteryEntityPair = device.battery_entity;
|
||||||
@ -548,9 +551,39 @@ export class HaConfigDeviceDashboard extends SubscribeMixin(LitElement) {
|
|||||||
.batteryChargingStateObj=${batteryCharging}
|
.batteryChargingStateObj=${batteryCharging}
|
||||||
></ha-battery-icon>
|
></ha-battery-icon>
|
||||||
`
|
`
|
||||||
: html`—`;
|
: "—";
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
created_at: {
|
||||||
|
title: localize("ui.panel.config.generic.headers.created_at"),
|
||||||
|
defaultHidden: true,
|
||||||
|
sortable: true,
|
||||||
|
filterable: true,
|
||||||
|
minWidth: "128px",
|
||||||
|
template: (entry) =>
|
||||||
|
entry.created_at
|
||||||
|
? formatShortDateTime(
|
||||||
|
new Date(entry.created_at * 1000),
|
||||||
|
this.hass.locale,
|
||||||
|
this.hass.config
|
||||||
|
)
|
||||||
|
: "—",
|
||||||
|
},
|
||||||
|
modified_at: {
|
||||||
|
title: localize("ui.panel.config.generic.headers.modified_at"),
|
||||||
|
defaultHidden: true,
|
||||||
|
sortable: true,
|
||||||
|
filterable: true,
|
||||||
|
minWidth: "128px",
|
||||||
|
template: (entry) =>
|
||||||
|
entry.modified_at
|
||||||
|
? formatShortDateTime(
|
||||||
|
new Date(entry.modified_at * 1000),
|
||||||
|
this.hass.locale,
|
||||||
|
this.hass.config
|
||||||
|
)
|
||||||
|
: "—",
|
||||||
|
},
|
||||||
disabled_by: {
|
disabled_by: {
|
||||||
title: "",
|
title: "",
|
||||||
label: localize("ui.panel.config.devices.data_table.disabled_by"),
|
label: localize("ui.panel.config.devices.data_table.disabled_by"),
|
||||||
@ -675,7 +708,7 @@ export class HaConfigDeviceDashboard extends SubscribeMixin(LitElement) {
|
|||||||
"ui.panel.config.devices.picker.search",
|
"ui.panel.config.devices.picker.search",
|
||||||
{ number: devicesOutput.length }
|
{ number: devicesOutput.length }
|
||||||
)}
|
)}
|
||||||
.columns=${this._columns(this.hass.localize, this.narrow)}
|
.columns=${this._columns(this.hass.localize)}
|
||||||
.data=${devicesOutput}
|
.data=${devicesOutput}
|
||||||
selectable
|
selectable
|
||||||
.selected=${this._selected.length}
|
.selected=${this._selected.length}
|
||||||
|
@ -103,6 +103,7 @@ import {
|
|||||||
deserializeFilters,
|
deserializeFilters,
|
||||||
DataTableFilters,
|
DataTableFilters,
|
||||||
} from "../../../data/data_table_filters";
|
} from "../../../data/data_table_filters";
|
||||||
|
import { formatShortDateTime } from "../../../common/datetime/format_date_time";
|
||||||
|
|
||||||
export interface StateEntity
|
export interface StateEntity
|
||||||
extends Omit<EntityRegistryEntry, "id" | "unique_id"> {
|
extends Omit<EntityRegistryEntry, "id" | "unique_id"> {
|
||||||
@ -294,7 +295,7 @@ export class HaConfigEntities extends SubscribeMixin(LitElement) {
|
|||||||
sortable: true,
|
sortable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
direction: "asc",
|
direction: "asc",
|
||||||
grows: true,
|
flex: 2,
|
||||||
extraTemplate: (entry) =>
|
extraTemplate: (entry) =>
|
||||||
entry.label_entries.length
|
entry.label_entries.length
|
||||||
? html`
|
? html`
|
||||||
@ -308,14 +309,12 @@ export class HaConfigEntities extends SubscribeMixin(LitElement) {
|
|||||||
title: localize("ui.panel.config.entities.picker.headers.entity_id"),
|
title: localize("ui.panel.config.entities.picker.headers.entity_id"),
|
||||||
sortable: true,
|
sortable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
width: "25%",
|
|
||||||
},
|
},
|
||||||
localized_platform: {
|
localized_platform: {
|
||||||
title: localize("ui.panel.config.entities.picker.headers.integration"),
|
title: localize("ui.panel.config.entities.picker.headers.integration"),
|
||||||
sortable: true,
|
sortable: true,
|
||||||
groupable: true,
|
groupable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
width: "20%",
|
|
||||||
},
|
},
|
||||||
domain: {
|
domain: {
|
||||||
title: localize("ui.panel.config.entities.picker.headers.domain"),
|
title: localize("ui.panel.config.entities.picker.headers.domain"),
|
||||||
@ -329,7 +328,6 @@ export class HaConfigEntities extends SubscribeMixin(LitElement) {
|
|||||||
sortable: true,
|
sortable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
groupable: true,
|
groupable: true,
|
||||||
width: "15%",
|
|
||||||
},
|
},
|
||||||
disabled_by: {
|
disabled_by: {
|
||||||
title: localize("ui.panel.config.entities.picker.headers.disabled_by"),
|
title: localize("ui.panel.config.entities.picker.headers.disabled_by"),
|
||||||
@ -348,7 +346,6 @@ export class HaConfigEntities extends SubscribeMixin(LitElement) {
|
|||||||
showNarrow: true,
|
showNarrow: true,
|
||||||
sortable: true,
|
sortable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
width: "68px",
|
|
||||||
template: (entry) =>
|
template: (entry) =>
|
||||||
entry.unavailable ||
|
entry.unavailable ||
|
||||||
entry.disabled_by ||
|
entry.disabled_by ||
|
||||||
@ -398,6 +395,36 @@ export class HaConfigEntities extends SubscribeMixin(LitElement) {
|
|||||||
`
|
`
|
||||||
: "—",
|
: "—",
|
||||||
},
|
},
|
||||||
|
created_at: {
|
||||||
|
title: localize("ui.panel.config.generic.headers.created_at"),
|
||||||
|
defaultHidden: true,
|
||||||
|
sortable: true,
|
||||||
|
filterable: true,
|
||||||
|
minWidth: "128px",
|
||||||
|
template: (entry) =>
|
||||||
|
entry.created_at
|
||||||
|
? formatShortDateTime(
|
||||||
|
new Date(entry.created_at * 1000),
|
||||||
|
this.hass.locale,
|
||||||
|
this.hass.config
|
||||||
|
)
|
||||||
|
: "—",
|
||||||
|
},
|
||||||
|
modified_at: {
|
||||||
|
title: localize("ui.panel.config.generic.headers.modified_at"),
|
||||||
|
defaultHidden: true,
|
||||||
|
sortable: true,
|
||||||
|
filterable: true,
|
||||||
|
minWidth: "128px",
|
||||||
|
template: (entry) =>
|
||||||
|
entry.modified_at
|
||||||
|
? formatShortDateTime(
|
||||||
|
new Date(entry.modified_at * 1000),
|
||||||
|
this.hass.locale,
|
||||||
|
this.hass.config
|
||||||
|
)
|
||||||
|
: "—",
|
||||||
|
},
|
||||||
available: {
|
available: {
|
||||||
title: localize("ui.panel.config.entities.picker.headers.availability"),
|
title: localize("ui.panel.config.entities.picker.headers.availability"),
|
||||||
sortable: true,
|
sortable: true,
|
||||||
@ -1081,6 +1108,8 @@ ${
|
|||||||
options: null,
|
options: null,
|
||||||
labels: [],
|
labels: [],
|
||||||
categories: {},
|
categories: {},
|
||||||
|
created_at: 0,
|
||||||
|
modified_at: 0,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (changed) {
|
if (changed) {
|
||||||
|
@ -280,7 +280,7 @@ export class HaConfigHelpers extends SubscribeMixin(LitElement) {
|
|||||||
main: true,
|
main: true,
|
||||||
sortable: true,
|
sortable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
grows: true,
|
flex: 2,
|
||||||
direction: "asc",
|
direction: "asc",
|
||||||
extraTemplate: (helper) =>
|
extraTemplate: (helper) =>
|
||||||
helper.label_entries.length
|
helper.label_entries.length
|
||||||
@ -295,7 +295,6 @@ export class HaConfigHelpers extends SubscribeMixin(LitElement) {
|
|||||||
title: localize("ui.panel.config.helpers.picker.headers.entity_id"),
|
title: localize("ui.panel.config.helpers.picker.headers.entity_id"),
|
||||||
sortable: true,
|
sortable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
width: "25%",
|
|
||||||
},
|
},
|
||||||
category: {
|
category: {
|
||||||
title: localize("ui.panel.config.helpers.picker.headers.category"),
|
title: localize("ui.panel.config.helpers.picker.headers.category"),
|
||||||
@ -314,7 +313,6 @@ export class HaConfigHelpers extends SubscribeMixin(LitElement) {
|
|||||||
localized_type: {
|
localized_type: {
|
||||||
title: localize("ui.panel.config.helpers.picker.headers.type"),
|
title: localize("ui.panel.config.helpers.picker.headers.type"),
|
||||||
sortable: true,
|
sortable: true,
|
||||||
width: "25%",
|
|
||||||
filterable: true,
|
filterable: true,
|
||||||
groupable: true,
|
groupable: true,
|
||||||
},
|
},
|
||||||
@ -344,7 +342,6 @@ export class HaConfigHelpers extends SubscribeMixin(LitElement) {
|
|||||||
actions: {
|
actions: {
|
||||||
title: "",
|
title: "",
|
||||||
label: "Actions",
|
label: "Actions",
|
||||||
width: "64px",
|
|
||||||
type: "overflow-menu",
|
type: "overflow-menu",
|
||||||
hideable: false,
|
hideable: false,
|
||||||
moveable: false,
|
moveable: false,
|
||||||
|
@ -44,7 +44,7 @@ export class ZHAClustersDataTable extends LitElement {
|
|||||||
title: "Name",
|
title: "Name",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
direction: "asc",
|
direction: "asc",
|
||||||
grows: true,
|
flex: 2,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
: {
|
: {
|
||||||
@ -52,18 +52,16 @@ export class ZHAClustersDataTable extends LitElement {
|
|||||||
title: "Name",
|
title: "Name",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
direction: "asc",
|
direction: "asc",
|
||||||
grows: true,
|
flex: 2,
|
||||||
},
|
},
|
||||||
id: {
|
id: {
|
||||||
title: "ID",
|
title: "ID",
|
||||||
template: (cluster) => html` ${formatAsPaddedHex(cluster.id)} `,
|
template: (cluster) => html` ${formatAsPaddedHex(cluster.id)} `,
|
||||||
sortable: true,
|
sortable: true,
|
||||||
width: "25%",
|
|
||||||
},
|
},
|
||||||
endpoint_id: {
|
endpoint_id: {
|
||||||
title: "Endpoint ID",
|
title: "Endpoint ID",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
width: "15%",
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -65,7 +65,7 @@ export class ZHADeviceEndpointDataTable extends LitElement {
|
|||||||
sortable: true,
|
sortable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
direction: "asc",
|
direction: "asc",
|
||||||
grows: true,
|
flex: 2,
|
||||||
template: (device) => html`
|
template: (device) => html`
|
||||||
<a href=${`/config/devices/device/${device.dev_id}`}>
|
<a href=${`/config/devices/device/${device.dev_id}`}>
|
||||||
${device.name}
|
${device.name}
|
||||||
@ -84,7 +84,7 @@ export class ZHADeviceEndpointDataTable extends LitElement {
|
|||||||
sortable: true,
|
sortable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
direction: "asc",
|
direction: "asc",
|
||||||
grows: true,
|
flex: 2,
|
||||||
template: (device) => html`
|
template: (device) => html`
|
||||||
<a href=${`/config/devices/device/${device.dev_id}`}>
|
<a href=${`/config/devices/device/${device.dev_id}`}>
|
||||||
${device.name}
|
${device.name}
|
||||||
@ -100,7 +100,7 @@ export class ZHADeviceEndpointDataTable extends LitElement {
|
|||||||
title: "Associated Entities",
|
title: "Associated Entities",
|
||||||
sortable: false,
|
sortable: false,
|
||||||
filterable: false,
|
filterable: false,
|
||||||
width: "50%",
|
flex: 2,
|
||||||
template: (device) => html`
|
template: (device) => html`
|
||||||
${device.entities.length
|
${device.entities.length
|
||||||
? device.entities.length > 3
|
? device.entities.length > 3
|
||||||
|
@ -69,14 +69,13 @@ class ZHADeviceNeighbors extends LitElement {
|
|||||||
sortable: true,
|
sortable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
direction: "asc",
|
direction: "asc",
|
||||||
grows: true,
|
flex: 2,
|
||||||
},
|
},
|
||||||
lqi: {
|
lqi: {
|
||||||
title: this.hass.localize("ui.panel.config.zha.neighbors.lqi"),
|
title: this.hass.localize("ui.panel.config.zha.neighbors.lqi"),
|
||||||
sortable: true,
|
sortable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
type: "numeric",
|
type: "numeric",
|
||||||
width: "75px",
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
: {
|
: {
|
||||||
@ -85,14 +84,13 @@ class ZHADeviceNeighbors extends LitElement {
|
|||||||
sortable: true,
|
sortable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
direction: "asc",
|
direction: "asc",
|
||||||
grows: true,
|
flex: 2,
|
||||||
},
|
},
|
||||||
lqi: {
|
lqi: {
|
||||||
title: this.hass.localize("ui.panel.config.zha.neighbors.lqi"),
|
title: this.hass.localize("ui.panel.config.zha.neighbors.lqi"),
|
||||||
sortable: true,
|
sortable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
type: "numeric",
|
type: "numeric",
|
||||||
width: "75px",
|
|
||||||
},
|
},
|
||||||
relationship: {
|
relationship: {
|
||||||
title: this.hass.localize(
|
title: this.hass.localize(
|
||||||
@ -100,14 +98,12 @@ class ZHADeviceNeighbors extends LitElement {
|
|||||||
),
|
),
|
||||||
sortable: true,
|
sortable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
width: "150px",
|
|
||||||
},
|
},
|
||||||
depth: {
|
depth: {
|
||||||
title: this.hass.localize("ui.panel.config.zha.neighbors.depth"),
|
title: this.hass.localize("ui.panel.config.zha.neighbors.depth"),
|
||||||
sortable: true,
|
sortable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
type: "numeric",
|
type: "numeric",
|
||||||
width: "75px",
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -79,7 +79,7 @@ export class ZHAGroupsDashboard extends LitElement {
|
|||||||
sortable: true,
|
sortable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
direction: "asc",
|
direction: "asc",
|
||||||
grows: true,
|
flex: 2,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
: {
|
: {
|
||||||
@ -88,19 +88,17 @@ export class ZHAGroupsDashboard extends LitElement {
|
|||||||
sortable: true,
|
sortable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
direction: "asc",
|
direction: "asc",
|
||||||
grows: true,
|
flex: 2,
|
||||||
},
|
},
|
||||||
group_id: {
|
group_id: {
|
||||||
title: this.hass.localize("ui.panel.config.zha.groups.group_id"),
|
title: this.hass.localize("ui.panel.config.zha.groups.group_id"),
|
||||||
type: "numeric",
|
type: "numeric",
|
||||||
width: "15%",
|
|
||||||
template: (group) => html` ${formatAsPaddedHex(group.group_id)} `,
|
template: (group) => html` ${formatAsPaddedHex(group.group_id)} `,
|
||||||
sortable: true,
|
sortable: true,
|
||||||
},
|
},
|
||||||
members: {
|
members: {
|
||||||
title: this.hass.localize("ui.panel.config.zha.groups.members"),
|
title: this.hass.localize("ui.panel.config.zha.groups.members"),
|
||||||
type: "numeric",
|
type: "numeric",
|
||||||
width: "15%",
|
|
||||||
template: (group) => html` ${group.members.length} `,
|
template: (group) => html` ${group.members.length} `,
|
||||||
sortable: true,
|
sortable: true,
|
||||||
},
|
},
|
||||||
|
@ -47,7 +47,6 @@ class ZWaveJSProvisioned extends LitElement {
|
|||||||
"ui.panel.config.zwave_js.provisioned.included"
|
"ui.panel.config.zwave_js.provisioned.included"
|
||||||
),
|
),
|
||||||
type: "icon",
|
type: "icon",
|
||||||
width: "100px",
|
|
||||||
template: (entry) =>
|
template: (entry) =>
|
||||||
entry.nodeId
|
entry.nodeId
|
||||||
? html`
|
? html`
|
||||||
@ -71,13 +70,12 @@ class ZWaveJSProvisioned extends LitElement {
|
|||||||
title: this.hass.localize("ui.panel.config.zwave_js.provisioned.dsk"),
|
title: this.hass.localize("ui.panel.config.zwave_js.provisioned.dsk"),
|
||||||
sortable: true,
|
sortable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
grows: true,
|
flex: 2,
|
||||||
},
|
},
|
||||||
security_classes: {
|
security_classes: {
|
||||||
title: this.hass.localize(
|
title: this.hass.localize(
|
||||||
"ui.panel.config.zwave_js.provisioned.security_classes"
|
"ui.panel.config.zwave_js.provisioned.security_classes"
|
||||||
),
|
),
|
||||||
width: "30%",
|
|
||||||
hidden: narrow,
|
hidden: narrow,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
sortable: true,
|
sortable: true,
|
||||||
@ -97,7 +95,6 @@ class ZWaveJSProvisioned extends LitElement {
|
|||||||
"ui.panel.config.zwave_js.provisioned.unprovison"
|
"ui.panel.config.zwave_js.provisioned.unprovison"
|
||||||
),
|
),
|
||||||
type: "icon-button",
|
type: "icon-button",
|
||||||
width: "100px",
|
|
||||||
template: (entry) => html`
|
template: (entry) => html`
|
||||||
<ha-icon-button
|
<ha-icon-button
|
||||||
.label=${this.hass.localize(
|
.label=${this.hass.localize(
|
||||||
|
@ -10,6 +10,8 @@ import { LitElement, PropertyValues, html, nothing } from "lit";
|
|||||||
import { customElement, property, state } from "lit/decorators";
|
import { customElement, property, state } from "lit/decorators";
|
||||||
import memoizeOne from "memoize-one";
|
import memoizeOne from "memoize-one";
|
||||||
import { computeCssColor } from "../../../common/color/compute-color";
|
import { computeCssColor } from "../../../common/color/compute-color";
|
||||||
|
import { formatShortDateTime } from "../../../common/datetime/format_date_time";
|
||||||
|
import { storage } from "../../../common/decorators/storage";
|
||||||
import { navigate } from "../../../common/navigate";
|
import { navigate } from "../../../common/navigate";
|
||||||
import { LocalizeFunc } from "../../../common/translations/localize";
|
import { LocalizeFunc } from "../../../common/translations/localize";
|
||||||
import {
|
import {
|
||||||
@ -37,7 +39,6 @@ import "../../../layouts/hass-tabs-subpage-data-table";
|
|||||||
import { HomeAssistant, Route } from "../../../types";
|
import { HomeAssistant, Route } from "../../../types";
|
||||||
import { configSections } from "../ha-panel-config";
|
import { configSections } from "../ha-panel-config";
|
||||||
import { showLabelDetailDialog } from "./show-dialog-label-detail";
|
import { showLabelDetailDialog } from "./show-dialog-label-detail";
|
||||||
import { storage } from "../../../common/decorators/storage";
|
|
||||||
|
|
||||||
@customElement("ha-config-labels")
|
@customElement("ha-config-labels")
|
||||||
export class HaConfigLabels extends LitElement {
|
export class HaConfigLabels extends LitElement {
|
||||||
@ -80,7 +81,7 @@ export class HaConfigLabels extends LitElement {
|
|||||||
})
|
})
|
||||||
private _activeHiddenColumns?: string[];
|
private _activeHiddenColumns?: string[];
|
||||||
|
|
||||||
private _columns = memoizeOne((localize: LocalizeFunc) => {
|
private _columns = memoizeOne((localize: LocalizeFunc, narrow: boolean) => {
|
||||||
const columns: DataTableColumnContainer<LabelRegistryEntry> = {
|
const columns: DataTableColumnContainer<LabelRegistryEntry> = {
|
||||||
icon: {
|
icon: {
|
||||||
title: "",
|
title: "",
|
||||||
@ -110,22 +111,60 @@ export class HaConfigLabels extends LitElement {
|
|||||||
name: {
|
name: {
|
||||||
title: localize("ui.panel.config.labels.headers.name"),
|
title: localize("ui.panel.config.labels.headers.name"),
|
||||||
main: true,
|
main: true,
|
||||||
|
flex: 2,
|
||||||
sortable: true,
|
sortable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
grows: true,
|
template: narrow
|
||||||
template: (label) => html`
|
? undefined
|
||||||
<div>${label.name}</div>
|
: (label) => html`
|
||||||
${label.description
|
<div>${label.name}</div>
|
||||||
? html`<div class="secondary">${label.description}</div>`
|
${label.description
|
||||||
: nothing}
|
? html`<div class="secondary">${label.description}</div>`
|
||||||
`,
|
: nothing}
|
||||||
|
`,
|
||||||
|
},
|
||||||
|
description: {
|
||||||
|
title: localize("ui.panel.config.labels.headers.description"),
|
||||||
|
hidden: !narrow,
|
||||||
|
filterable: true,
|
||||||
|
hideable: true,
|
||||||
|
},
|
||||||
|
created_at: {
|
||||||
|
title: localize("ui.panel.config.generic.headers.created_at"),
|
||||||
|
defaultHidden: true,
|
||||||
|
sortable: true,
|
||||||
|
filterable: true,
|
||||||
|
minWidth: "128px",
|
||||||
|
template: (label) =>
|
||||||
|
label.created_at
|
||||||
|
? formatShortDateTime(
|
||||||
|
new Date(label.created_at * 1000),
|
||||||
|
this.hass.locale,
|
||||||
|
this.hass.config
|
||||||
|
)
|
||||||
|
: "—",
|
||||||
|
},
|
||||||
|
modified_at: {
|
||||||
|
title: localize("ui.panel.config.generic.headers.modified_at"),
|
||||||
|
defaultHidden: true,
|
||||||
|
sortable: true,
|
||||||
|
filterable: true,
|
||||||
|
minWidth: "128px",
|
||||||
|
template: (label) =>
|
||||||
|
label.modified_at
|
||||||
|
? formatShortDateTime(
|
||||||
|
new Date(label.modified_at * 1000),
|
||||||
|
this.hass.locale,
|
||||||
|
this.hass.config
|
||||||
|
)
|
||||||
|
: "—",
|
||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
title: "",
|
title: "",
|
||||||
|
label: localize("ui.panel.config.generic.headers.actions"),
|
||||||
showNarrow: true,
|
showNarrow: true,
|
||||||
moveable: false,
|
moveable: false,
|
||||||
hideable: false,
|
hideable: false,
|
||||||
width: "64px",
|
|
||||||
type: "overflow-menu",
|
type: "overflow-menu",
|
||||||
template: (label) => html`
|
template: (label) => html`
|
||||||
<ha-icon-overflow-menu
|
<ha-icon-overflow-menu
|
||||||
@ -182,7 +221,7 @@ export class HaConfigLabels extends LitElement {
|
|||||||
back-path="/config"
|
back-path="/config"
|
||||||
.route=${this.route}
|
.route=${this.route}
|
||||||
.tabs=${configSections.areas}
|
.tabs=${configSections.areas}
|
||||||
.columns=${this._columns(this.hass.localize)}
|
.columns=${this._columns(this.hass.localize, this.narrow)}
|
||||||
.data=${this._data(this._labels)}
|
.data=${this._data(this._labels)}
|
||||||
.noDataText=${this.hass.localize("ui.panel.config.labels.no_labels")}
|
.noDataText=${this.hass.localize("ui.panel.config.labels.no_labels")}
|
||||||
hasFab
|
hasFab
|
||||||
|
@ -143,7 +143,7 @@ export class HaConfigLovelaceDashboards extends LitElement {
|
|||||||
main: true,
|
main: true,
|
||||||
sortable: true,
|
sortable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
grows: true,
|
flex: 2,
|
||||||
template: narrow
|
template: narrow
|
||||||
? undefined
|
? undefined
|
||||||
: (dashboard) => html`
|
: (dashboard) => html`
|
||||||
@ -171,7 +171,6 @@ export class HaConfigLovelaceDashboards extends LitElement {
|
|||||||
),
|
),
|
||||||
sortable: true,
|
sortable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
width: "20%",
|
|
||||||
template: (dashboard) => html`
|
template: (dashboard) => html`
|
||||||
${this.hass.localize(
|
${this.hass.localize(
|
||||||
`ui.panel.config.lovelace.dashboards.conf_mode.${dashboard.mode}`
|
`ui.panel.config.lovelace.dashboards.conf_mode.${dashboard.mode}`
|
||||||
@ -183,7 +182,6 @@ export class HaConfigLovelaceDashboards extends LitElement {
|
|||||||
title: localize(
|
title: localize(
|
||||||
"ui.panel.config.lovelace.dashboards.picker.headers.filename"
|
"ui.panel.config.lovelace.dashboards.picker.headers.filename"
|
||||||
),
|
),
|
||||||
width: "15%",
|
|
||||||
sortable: true,
|
sortable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
};
|
};
|
||||||
@ -195,7 +193,6 @@ export class HaConfigLovelaceDashboards extends LitElement {
|
|||||||
sortable: true,
|
sortable: true,
|
||||||
type: "icon",
|
type: "icon",
|
||||||
hidden: narrow,
|
hidden: narrow,
|
||||||
width: "100px",
|
|
||||||
template: (dashboard) =>
|
template: (dashboard) =>
|
||||||
dashboard.require_admin
|
dashboard.require_admin
|
||||||
? html`<ha-svg-icon .path=${mdiCheck}></ha-svg-icon>`
|
? html`<ha-svg-icon .path=${mdiCheck}></ha-svg-icon>`
|
||||||
@ -207,7 +204,6 @@ export class HaConfigLovelaceDashboards extends LitElement {
|
|||||||
),
|
),
|
||||||
type: "icon",
|
type: "icon",
|
||||||
hidden: narrow,
|
hidden: narrow,
|
||||||
width: "121px",
|
|
||||||
template: (dashboard) =>
|
template: (dashboard) =>
|
||||||
dashboard.show_in_sidebar
|
dashboard.show_in_sidebar
|
||||||
? html`<ha-svg-icon .path=${mdiCheck}></ha-svg-icon>`
|
? html`<ha-svg-icon .path=${mdiCheck}></ha-svg-icon>`
|
||||||
@ -221,7 +217,6 @@ export class HaConfigLovelaceDashboards extends LitElement {
|
|||||||
),
|
),
|
||||||
filterable: true,
|
filterable: true,
|
||||||
showNarrow: true,
|
showNarrow: true,
|
||||||
width: "100px",
|
|
||||||
template: (dashboard) =>
|
template: (dashboard) =>
|
||||||
narrow
|
narrow
|
||||||
? html`
|
? html`
|
||||||
|
@ -94,7 +94,7 @@ export class HaConfigLovelaceRescources extends LitElement {
|
|||||||
sortable: true,
|
sortable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
direction: "asc",
|
direction: "asc",
|
||||||
grows: true,
|
flex: 2,
|
||||||
forceLTR: true,
|
forceLTR: true,
|
||||||
},
|
},
|
||||||
type: {
|
type: {
|
||||||
@ -103,7 +103,6 @@ export class HaConfigLovelaceRescources extends LitElement {
|
|||||||
),
|
),
|
||||||
sortable: true,
|
sortable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
width: "30%",
|
|
||||||
template: (resource) => html`
|
template: (resource) => html`
|
||||||
${this.hass.localize(
|
${this.hass.localize(
|
||||||
`ui.panel.config.lovelace.resources.types.${resource.type}`
|
`ui.panel.config.lovelace.resources.types.${resource.type}`
|
||||||
|
@ -260,7 +260,7 @@ class HaSceneDashboard extends SubscribeMixin(LitElement) {
|
|||||||
sortable: true,
|
sortable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
direction: "asc",
|
direction: "asc",
|
||||||
grows: true,
|
flex: 2,
|
||||||
extraTemplate: (scene) =>
|
extraTemplate: (scene) =>
|
||||||
scene.labels.length
|
scene.labels.length
|
||||||
? html`<ha-data-table-labels
|
? html`<ha-data-table-labels
|
||||||
@ -294,7 +294,6 @@ class HaSceneDashboard extends SubscribeMixin(LitElement) {
|
|||||||
"ui.panel.config.scene.picker.headers.last_activated"
|
"ui.panel.config.scene.picker.headers.last_activated"
|
||||||
),
|
),
|
||||||
sortable: true,
|
sortable: true,
|
||||||
width: "30%",
|
|
||||||
template: (scene) => {
|
template: (scene) => {
|
||||||
const lastActivated = scene.state;
|
const lastActivated = scene.state;
|
||||||
if (!lastActivated || isUnavailableState(lastActivated)) {
|
if (!lastActivated || isUnavailableState(lastActivated)) {
|
||||||
@ -312,7 +311,7 @@ class HaSceneDashboard extends SubscribeMixin(LitElement) {
|
|||||||
},
|
},
|
||||||
only_editable: {
|
only_editable: {
|
||||||
title: "",
|
title: "",
|
||||||
width: "56px",
|
type: "icon",
|
||||||
showNarrow: true,
|
showNarrow: true,
|
||||||
template: (scene) =>
|
template: (scene) =>
|
||||||
!scene.attributes.id
|
!scene.attributes.id
|
||||||
@ -331,7 +330,6 @@ class HaSceneDashboard extends SubscribeMixin(LitElement) {
|
|||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
title: "",
|
title: "",
|
||||||
width: "64px",
|
|
||||||
type: "overflow-menu",
|
type: "overflow-menu",
|
||||||
showNarrow: true,
|
showNarrow: true,
|
||||||
moveable: false,
|
moveable: false,
|
||||||
|
@ -270,7 +270,7 @@ class HaScriptPicker extends SubscribeMixin(LitElement) {
|
|||||||
sortable: true,
|
sortable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
direction: "asc",
|
direction: "asc",
|
||||||
grows: true,
|
flex: 2,
|
||||||
extraTemplate: (script) =>
|
extraTemplate: (script) =>
|
||||||
script.labels.length
|
script.labels.length
|
||||||
? html`<ha-data-table-labels
|
? html`<ha-data-table-labels
|
||||||
@ -301,7 +301,6 @@ class HaScriptPicker extends SubscribeMixin(LitElement) {
|
|||||||
},
|
},
|
||||||
last_triggered: {
|
last_triggered: {
|
||||||
sortable: true,
|
sortable: true,
|
||||||
width: "40%",
|
|
||||||
title: localize("ui.card.automation.last_triggered"),
|
title: localize("ui.card.automation.last_triggered"),
|
||||||
template: (script) => {
|
template: (script) => {
|
||||||
const date = new Date(script.last_triggered);
|
const date = new Date(script.last_triggered);
|
||||||
@ -322,7 +321,6 @@ class HaScriptPicker extends SubscribeMixin(LitElement) {
|
|||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
title: "",
|
title: "",
|
||||||
width: "64px",
|
|
||||||
type: "overflow-menu",
|
type: "overflow-menu",
|
||||||
showNarrow: true,
|
showNarrow: true,
|
||||||
moveable: false,
|
moveable: false,
|
||||||
|
@ -81,13 +81,12 @@ export class HaConfigTags extends SubscribeMixin(LitElement) {
|
|||||||
main: true,
|
main: true,
|
||||||
sortable: true,
|
sortable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
grows: true,
|
flex: 2,
|
||||||
},
|
},
|
||||||
last_scanned_datetime: {
|
last_scanned_datetime: {
|
||||||
title: localize("ui.panel.config.tag.headers.last_scanned"),
|
title: localize("ui.panel.config.tag.headers.last_scanned"),
|
||||||
sortable: true,
|
sortable: true,
|
||||||
direction: "desc",
|
direction: "desc",
|
||||||
width: "20%",
|
|
||||||
template: (tag) => html`
|
template: (tag) => html`
|
||||||
${tag.last_scanned_datetime
|
${tag.last_scanned_datetime
|
||||||
? html`<ha-relative-time
|
? html`<ha-relative-time
|
||||||
|
@ -83,15 +83,13 @@ export class HaConfigUsers extends LitElement {
|
|||||||
main: true,
|
main: true,
|
||||||
sortable: true,
|
sortable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
width: "25%",
|
|
||||||
direction: "asc",
|
direction: "asc",
|
||||||
grows: true,
|
flex: 2,
|
||||||
},
|
},
|
||||||
username: {
|
username: {
|
||||||
title: localize("ui.panel.config.users.picker.headers.username"),
|
title: localize("ui.panel.config.users.picker.headers.username"),
|
||||||
sortable: true,
|
sortable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
width: "20%",
|
|
||||||
direction: "asc",
|
direction: "asc",
|
||||||
template: (user) => html`${user.username || "—"}`,
|
template: (user) => html`${user.username || "—"}`,
|
||||||
},
|
},
|
||||||
@ -100,7 +98,6 @@ export class HaConfigUsers extends LitElement {
|
|||||||
sortable: true,
|
sortable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
groupable: true,
|
groupable: true,
|
||||||
width: "20%",
|
|
||||||
direction: "asc",
|
direction: "asc",
|
||||||
},
|
},
|
||||||
is_active: {
|
is_active: {
|
||||||
@ -110,7 +107,6 @@ export class HaConfigUsers extends LitElement {
|
|||||||
type: "icon",
|
type: "icon",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
width: "80px",
|
|
||||||
hidden: narrow,
|
hidden: narrow,
|
||||||
template: (user) =>
|
template: (user) =>
|
||||||
user.is_active
|
user.is_active
|
||||||
@ -124,7 +120,6 @@ export class HaConfigUsers extends LitElement {
|
|||||||
type: "icon",
|
type: "icon",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
width: "80px",
|
|
||||||
hidden: narrow,
|
hidden: narrow,
|
||||||
template: (user) =>
|
template: (user) =>
|
||||||
user.system_generated
|
user.system_generated
|
||||||
@ -138,7 +133,6 @@ export class HaConfigUsers extends LitElement {
|
|||||||
type: "icon",
|
type: "icon",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
width: "80px",
|
|
||||||
hidden: narrow,
|
hidden: narrow,
|
||||||
template: (user) =>
|
template: (user) =>
|
||||||
user.local_only
|
user.local_only
|
||||||
@ -153,7 +147,7 @@ export class HaConfigUsers extends LitElement {
|
|||||||
type: "icon",
|
type: "icon",
|
||||||
sortable: false,
|
sortable: false,
|
||||||
filterable: false,
|
filterable: false,
|
||||||
width: "104px",
|
minWidth: "104px",
|
||||||
hidden: !narrow,
|
hidden: !narrow,
|
||||||
showNarrow: true,
|
showNarrow: true,
|
||||||
template: (user) => {
|
template: (user) => {
|
||||||
|
@ -42,13 +42,12 @@ class AssistDevicesPage extends LitElement {
|
|||||||
),
|
),
|
||||||
filterable: true,
|
filterable: true,
|
||||||
sortable: true,
|
sortable: true,
|
||||||
grows: true,
|
flex: 2,
|
||||||
},
|
},
|
||||||
pipeline: {
|
pipeline: {
|
||||||
title: localize(
|
title: localize(
|
||||||
"ui.panel.config.voice_assistants.assistants.pipeline.devices.pipeline"
|
"ui.panel.config.voice_assistants.assistants.pipeline.devices.pipeline"
|
||||||
),
|
),
|
||||||
width: "30%",
|
|
||||||
filterable: true,
|
filterable: true,
|
||||||
sortable: true,
|
sortable: true,
|
||||||
},
|
},
|
||||||
@ -58,7 +57,6 @@ class AssistDevicesPage extends LitElement {
|
|||||||
),
|
),
|
||||||
filterable: true,
|
filterable: true,
|
||||||
sortable: true,
|
sortable: true,
|
||||||
width: "30%",
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -167,7 +167,7 @@ export class VoiceAssistantsExpose extends LitElement {
|
|||||||
sortable: true,
|
sortable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
direction: "asc",
|
direction: "asc",
|
||||||
grows: true,
|
flex: 2,
|
||||||
template: narrow
|
template: narrow
|
||||||
? undefined
|
? undefined
|
||||||
: (entry) => html`
|
: (entry) => html`
|
||||||
@ -197,7 +197,6 @@ export class VoiceAssistantsExpose extends LitElement {
|
|||||||
sortable: true,
|
sortable: true,
|
||||||
groupable: true,
|
groupable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
width: "15%",
|
|
||||||
},
|
},
|
||||||
assistants: {
|
assistants: {
|
||||||
title: localize(
|
title: localize(
|
||||||
@ -206,7 +205,8 @@ export class VoiceAssistantsExpose extends LitElement {
|
|||||||
showNarrow: true,
|
showNarrow: true,
|
||||||
sortable: true,
|
sortable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
width: "160px",
|
minWidth: "160px",
|
||||||
|
maxWidth: "160px",
|
||||||
type: "flex",
|
type: "flex",
|
||||||
template: (entry) =>
|
template: (entry) =>
|
||||||
html`${availableAssistants.map((key) => {
|
html`${availableAssistants.map((key) => {
|
||||||
@ -233,7 +233,6 @@ export class VoiceAssistantsExpose extends LitElement {
|
|||||||
),
|
),
|
||||||
sortable: true,
|
sortable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
width: "15%",
|
|
||||||
template: (entry) =>
|
template: (entry) =>
|
||||||
entry.aliases.length === 0
|
entry.aliases.length === 0
|
||||||
? "-"
|
? "-"
|
||||||
|
@ -89,9 +89,10 @@ class HaPanelDevStatistics extends SubscribeMixin(LitElement) {
|
|||||||
title: localize(
|
title: localize(
|
||||||
"ui.panel.developer-tools.tabs.statistics.data_table.name"
|
"ui.panel.developer-tools.tabs.statistics.data_table.name"
|
||||||
),
|
),
|
||||||
|
main: true,
|
||||||
sortable: true,
|
sortable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
grows: true,
|
flex: 2,
|
||||||
},
|
},
|
||||||
statistic_id: {
|
statistic_id: {
|
||||||
title: localize(
|
title: localize(
|
||||||
@ -100,7 +101,6 @@ class HaPanelDevStatistics extends SubscribeMixin(LitElement) {
|
|||||||
sortable: true,
|
sortable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
hidden: this.narrow,
|
hidden: this.narrow,
|
||||||
width: "20%",
|
|
||||||
},
|
},
|
||||||
statistics_unit_of_measurement: {
|
statistics_unit_of_measurement: {
|
||||||
title: localize(
|
title: localize(
|
||||||
@ -108,7 +108,6 @@ class HaPanelDevStatistics extends SubscribeMixin(LitElement) {
|
|||||||
),
|
),
|
||||||
sortable: true,
|
sortable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
width: "10%",
|
|
||||||
forceLTR: true,
|
forceLTR: true,
|
||||||
},
|
},
|
||||||
source: {
|
source: {
|
||||||
@ -117,7 +116,6 @@ class HaPanelDevStatistics extends SubscribeMixin(LitElement) {
|
|||||||
),
|
),
|
||||||
sortable: true,
|
sortable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
width: "10%",
|
|
||||||
},
|
},
|
||||||
issues_string: {
|
issues_string: {
|
||||||
title: localize(
|
title: localize(
|
||||||
@ -126,7 +124,7 @@ class HaPanelDevStatistics extends SubscribeMixin(LitElement) {
|
|||||||
sortable: true,
|
sortable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
direction: "asc",
|
direction: "asc",
|
||||||
width: "30%",
|
flex: 2,
|
||||||
template: (statistic) =>
|
template: (statistic) =>
|
||||||
html`${statistic.issues_string ??
|
html`${statistic.issues_string ??
|
||||||
localize("ui.panel.developer-tools.tabs.statistics.no_issue")}`,
|
localize("ui.panel.developer-tools.tabs.statistics.no_issue")}`,
|
||||||
@ -147,12 +145,15 @@ class HaPanelDevStatistics extends SubscribeMixin(LitElement) {
|
|||||||
)}
|
)}
|
||||||
</mwc-button>`
|
</mwc-button>`
|
||||||
: "—"}`,
|
: "—"}`,
|
||||||
width: "113px",
|
minWidth: "113px",
|
||||||
|
maxWidth: "113px",
|
||||||
|
showNarrow: true,
|
||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
title: "",
|
title: "",
|
||||||
label: localize("ui.panel.developer-tools.tabs.statistics.adjust_sum"),
|
label: localize("ui.panel.developer-tools.tabs.statistics.adjust_sum"),
|
||||||
type: "icon-button",
|
type: "icon-button",
|
||||||
|
showNarrow: true,
|
||||||
template: (statistic) =>
|
template: (statistic) =>
|
||||||
statistic.has_sum
|
statistic.has_sum
|
||||||
? html`
|
? html`
|
||||||
@ -179,6 +180,7 @@ class HaPanelDevStatistics extends SubscribeMixin(LitElement) {
|
|||||||
.noDataText=${this.hass.localize(
|
.noDataText=${this.hass.localize(
|
||||||
"ui.panel.developer-tools.tabs.statistics.data_table.no_statistics"
|
"ui.panel.developer-tools.tabs.statistics.data_table.no_statistics"
|
||||||
)}
|
)}
|
||||||
|
.narrow=${this.narrow}
|
||||||
id="statistic_id"
|
id="statistic_id"
|
||||||
clickable
|
clickable
|
||||||
@row-click=${this._rowClicked}
|
@row-click=${this._rowClicked}
|
||||||
|
@ -64,7 +64,8 @@ export class HuiEntityPickerTable extends LitElement {
|
|||||||
title: this.hass!.localize("ui.panel.lovelace.unused_entities.entity"),
|
title: this.hass!.localize("ui.panel.lovelace.unused_entities.entity"),
|
||||||
sortable: true,
|
sortable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
grows: true,
|
flex: 2,
|
||||||
|
main: true,
|
||||||
direction: "asc",
|
direction: "asc",
|
||||||
template: (entity: any) => html`
|
template: (entity: any) => html`
|
||||||
<div @click=${this._handleEntityClicked} style="cursor: pointer;">
|
<div @click=${this._handleEntityClicked} style="cursor: pointer;">
|
||||||
@ -81,7 +82,6 @@ export class HuiEntityPickerTable extends LitElement {
|
|||||||
title: this.hass!.localize("ui.panel.lovelace.unused_entities.entity_id"),
|
title: this.hass!.localize("ui.panel.lovelace.unused_entities.entity_id"),
|
||||||
sortable: true,
|
sortable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
width: "30%",
|
|
||||||
hidden: narrow,
|
hidden: narrow,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -89,7 +89,6 @@ export class HuiEntityPickerTable extends LitElement {
|
|||||||
title: this.hass!.localize("ui.panel.lovelace.unused_entities.domain"),
|
title: this.hass!.localize("ui.panel.lovelace.unused_entities.domain"),
|
||||||
sortable: true,
|
sortable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
width: "15%",
|
|
||||||
hidden: narrow,
|
hidden: narrow,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -99,7 +98,6 @@ export class HuiEntityPickerTable extends LitElement {
|
|||||||
),
|
),
|
||||||
type: "numeric",
|
type: "numeric",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
width: "15%",
|
|
||||||
hidden: narrow,
|
hidden: narrow,
|
||||||
template: (entity) => html`
|
template: (entity) => html`
|
||||||
<ha-relative-time
|
<ha-relative-time
|
||||||
|
@ -1843,6 +1843,13 @@
|
|||||||
"error": "An unknown error occurred"
|
"error": "An unknown error occurred"
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
|
"generic": {
|
||||||
|
"headers": {
|
||||||
|
"modified_at": "Modified",
|
||||||
|
"created_at": "Created",
|
||||||
|
"actions": "Actions"
|
||||||
|
}
|
||||||
|
},
|
||||||
"header": "Configure Home Assistant",
|
"header": "Configure Home Assistant",
|
||||||
"dashboard": {
|
"dashboard": {
|
||||||
"devices": {
|
"devices": {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user