mirror of
https://github.com/home-assistant/frontend.git
synced 2025-04-27 06:47:20 +00:00
HAWS 6.1 (#12016)
This commit is contained in:
parent
a993d3a753
commit
fad8a27232
@ -108,7 +108,7 @@
|
|||||||
"fuse.js": "^6.0.0",
|
"fuse.js": "^6.0.0",
|
||||||
"google-timezones-json": "^1.0.2",
|
"google-timezones-json": "^1.0.2",
|
||||||
"hls.js": "^1.1.5",
|
"hls.js": "^1.1.5",
|
||||||
"home-assistant-js-websocket": "^6.0.1",
|
"home-assistant-js-websocket": "^6.1.1",
|
||||||
"idb-keyval": "^5.1.3",
|
"idb-keyval": "^5.1.3",
|
||||||
"intl-messageformat": "^9.9.1",
|
"intl-messageformat": "^9.9.1",
|
||||||
"js-yaml": "^4.1.0",
|
"js-yaml": "^4.1.0",
|
||||||
|
@ -15,11 +15,14 @@ import "../ha-icon-button";
|
|||||||
import "../ha-svg-icon";
|
import "../ha-svg-icon";
|
||||||
import "./state-badge";
|
import "./state-badge";
|
||||||
|
|
||||||
|
interface HassEntityWithCachedName extends HassEntity {
|
||||||
|
friendly_name: string;
|
||||||
|
}
|
||||||
|
|
||||||
export type HaEntityPickerEntityFilterFunc = (entityId: HassEntity) => boolean;
|
export type HaEntityPickerEntityFilterFunc = (entityId: HassEntity) => boolean;
|
||||||
|
|
||||||
// eslint-disable-next-line lit/prefer-static-styles
|
// eslint-disable-next-line lit/prefer-static-styles
|
||||||
const rowRenderer: ComboBoxLitRenderer<HassEntity & { friendly_name: string }> =
|
const rowRenderer: ComboBoxLitRenderer<HassEntityWithCachedName> = (item) =>
|
||||||
(item) =>
|
|
||||||
html`<mwc-list-item graphic="avatar" .twoline=${!!item.entity_id}>
|
html`<mwc-list-item graphic="avatar" .twoline=${!!item.entity_id}>
|
||||||
${item.state
|
${item.state
|
||||||
? html`<state-badge slot="graphic" .stateObj=${item}></state-badge>`
|
? html`<state-badge slot="graphic" .stateObj=${item}></state-badge>`
|
||||||
@ -96,7 +99,7 @@ export class HaEntityPicker extends LitElement {
|
|||||||
|
|
||||||
private _initedStates = false;
|
private _initedStates = false;
|
||||||
|
|
||||||
private _states: HassEntity[] = [];
|
private _states: HassEntityWithCachedName[] = [];
|
||||||
|
|
||||||
private _getStates = memoizeOne(
|
private _getStates = memoizeOne(
|
||||||
(
|
(
|
||||||
@ -107,8 +110,8 @@ export class HaEntityPicker extends LitElement {
|
|||||||
entityFilter: this["entityFilter"],
|
entityFilter: this["entityFilter"],
|
||||||
includeDeviceClasses: this["includeDeviceClasses"],
|
includeDeviceClasses: this["includeDeviceClasses"],
|
||||||
includeUnitOfMeasurement: this["includeUnitOfMeasurement"]
|
includeUnitOfMeasurement: this["includeUnitOfMeasurement"]
|
||||||
) => {
|
): HassEntityWithCachedName[] => {
|
||||||
let states: HassEntity[] = [];
|
let states: HassEntityWithCachedName[] = [];
|
||||||
|
|
||||||
if (!hass) {
|
if (!hass) {
|
||||||
return [];
|
return [];
|
||||||
@ -122,7 +125,7 @@ export class HaEntityPicker extends LitElement {
|
|||||||
state: "",
|
state: "",
|
||||||
last_changed: "",
|
last_changed: "",
|
||||||
last_updated: "",
|
last_updated: "",
|
||||||
context: { id: "", user_id: null },
|
context: { id: "", user_id: null, parent_id: null },
|
||||||
friendly_name: this.hass!.localize(
|
friendly_name: this.hass!.localize(
|
||||||
"ui.components.entity.entity-picker.no_entities"
|
"ui.components.entity.entity-picker.no_entities"
|
||||||
),
|
),
|
||||||
@ -190,7 +193,7 @@ export class HaEntityPicker extends LitElement {
|
|||||||
state: "",
|
state: "",
|
||||||
last_changed: "",
|
last_changed: "",
|
||||||
last_updated: "",
|
last_updated: "",
|
||||||
context: { id: "", user_id: null },
|
context: { id: "", user_id: null, parent_id: null },
|
||||||
friendly_name: this.hass!.localize(
|
friendly_name: this.hass!.localize(
|
||||||
"ui.components.entity.entity-picker.no_match"
|
"ui.components.entity.entity-picker.no_match"
|
||||||
),
|
),
|
||||||
|
@ -84,7 +84,7 @@ export class BrowserMediaPlayer {
|
|||||||
last_changed: now,
|
last_changed: now,
|
||||||
last_updated: now,
|
last_updated: now,
|
||||||
attributes: {},
|
attributes: {},
|
||||||
context: { id: "", user_id: null },
|
context: { id: "", user_id: null, parent_id: null },
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
10
yarn.lock
10
yarn.lock
@ -9128,7 +9128,7 @@ fsevents@^1.2.7:
|
|||||||
gulp-rename: ^2.0.0
|
gulp-rename: ^2.0.0
|
||||||
gulp-zopfli-green: ^3.0.1
|
gulp-zopfli-green: ^3.0.1
|
||||||
hls.js: ^1.1.5
|
hls.js: ^1.1.5
|
||||||
home-assistant-js-websocket: ^6.0.1
|
home-assistant-js-websocket: ^6.1.1
|
||||||
html-minifier: ^4.0.0
|
html-minifier: ^4.0.0
|
||||||
husky: ^1.3.1
|
husky: ^1.3.1
|
||||||
idb-keyval: ^5.1.3
|
idb-keyval: ^5.1.3
|
||||||
@ -9198,10 +9198,10 @@ fsevents@^1.2.7:
|
|||||||
languageName: unknown
|
languageName: unknown
|
||||||
linkType: soft
|
linkType: soft
|
||||||
|
|
||||||
"home-assistant-js-websocket@npm:^6.0.1":
|
"home-assistant-js-websocket@npm:^6.1.1":
|
||||||
version: 6.0.1
|
version: 6.1.1
|
||||||
resolution: "home-assistant-js-websocket@npm:6.0.1"
|
resolution: "home-assistant-js-websocket@npm:6.1.1"
|
||||||
checksum: 566d6de6a4eb0e05ca434a45433cfe6fdd6b5cb2008e9a165709e08335df1c9b70903564c479ab8d48c6f5468a9784f47697192f9023170d2d86d43a461d6126
|
checksum: b46dd44ac1b393ecfdda152743fe44dcd6534463d1df631c448a71e71166c04d4fea2a0827dbb2e55c85fcd8d9ccdea4f168713bf18e832c7f688b9b2fdc8d72
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user