Skip to content

Commit

Permalink
20240103.0 (#19256)
Browse files Browse the repository at this point in the history
  • Loading branch information
bramkragten authored Jan 3, 2024
2 parents 386c3ea + 6e7366b commit 0bc69fb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "home-assistant-frontend"
version = "20240102.0"
version = "20240103.0"
license = {text = "Apache-2.0"}
description = "The Home Assistant frontend"
readme = "README.md"
Expand Down
13 changes: 9 additions & 4 deletions src/panels/config/automation/add-automation-element-dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ class DialogAddAutomationElement extends LitElement implements HassDialog {
if (this._params?.type === "action") {
this.hass.loadBackendTranslation("services");
this._fetchManifests();
this._calculateUsedDomains();
}
this._fullScreen = matchMedia(
"all and (max-width: 450px), all and (max-height: 500px)"
Expand Down Expand Up @@ -425,6 +426,13 @@ class DialogAddAutomationElement extends LitElement implements HassDialog {
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 {
// Store the width and height so that when we search, box doesn't jump
const boundingRect =
Expand All @@ -439,10 +447,7 @@ class DialogAddAutomationElement extends LitElement implements HassDialog {
changedProperties.has("hass") &&
changedProperties.get("hass")?.states !== this.hass.states
) {
const domains = new Set(Object.keys(this.hass.states).map(computeDomain));
if (!deepEqual(domains, this._domains)) {
this._domains = domains;
}
this._calculateUsedDomains();
}
}

Expand Down

0 comments on commit 0bc69fb

Please sign in to comment.