mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-27 11:16:35 +00:00
20240103.0 (#19256)
This commit is contained in:
commit
0bc69fb9b3
@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "home-assistant-frontend"
|
name = "home-assistant-frontend"
|
||||||
version = "20240102.0"
|
version = "20240103.0"
|
||||||
license = {text = "Apache-2.0"}
|
license = {text = "Apache-2.0"}
|
||||||
description = "The Home Assistant frontend"
|
description = "The Home Assistant frontend"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
@ -122,6 +122,7 @@ class DialogAddAutomationElement extends LitElement implements HassDialog {
|
|||||||
if (this._params?.type === "action") {
|
if (this._params?.type === "action") {
|
||||||
this.hass.loadBackendTranslation("services");
|
this.hass.loadBackendTranslation("services");
|
||||||
this._fetchManifests();
|
this._fetchManifests();
|
||||||
|
this._calculateUsedDomains();
|
||||||
}
|
}
|
||||||
this._fullScreen = matchMedia(
|
this._fullScreen = matchMedia(
|
||||||
"all and (max-width: 450px), all and (max-height: 500px)"
|
"all and (max-width: 450px), all and (max-height: 500px)"
|
||||||
@ -425,6 +426,13 @@ class DialogAddAutomationElement extends LitElement implements HassDialog {
|
|||||||
this._manifests = manifests;
|
this._manifests = manifests;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private _calculateUsedDomains() {
|
||||||
|
const domains = new Set(Object.keys(this.hass.states).map(computeDomain));
|
||||||
|
if (!deepEqual(domains, this._domains)) {
|
||||||
|
this._domains = domains;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected _opened(): void {
|
protected _opened(): void {
|
||||||
// Store the width and height so that when we search, box doesn't jump
|
// Store the width and height so that when we search, box doesn't jump
|
||||||
const boundingRect =
|
const boundingRect =
|
||||||
@ -439,10 +447,7 @@ class DialogAddAutomationElement extends LitElement implements HassDialog {
|
|||||||
changedProperties.has("hass") &&
|
changedProperties.has("hass") &&
|
||||||
changedProperties.get("hass")?.states !== this.hass.states
|
changedProperties.get("hass")?.states !== this.hass.states
|
||||||
) {
|
) {
|
||||||
const domains = new Set(Object.keys(this.hass.states).map(computeDomain));
|
this._calculateUsedDomains();
|
||||||
if (!deepEqual(domains, this._domains)) {
|
|
||||||
this._domains = domains;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user