From 0bb34830f8586d1f5ae154fa9193f6b7f142868f Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Thu, 13 Jun 2024 18:26:45 +0200 Subject: [PATCH 1/6] Fix selected state for selected config entries (#21079) --- .../config/integrations/ha-config-integration-page.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/panels/config/integrations/ha-config-integration-page.ts b/src/panels/config/integrations/ha-config-integration-page.ts index 7a729dbff1..dafa45cde0 100644 --- a/src/panels/config/integrations/ha-config-integration-page.ts +++ b/src/panels/config/integrations/ha-config-integration-page.ts @@ -1414,14 +1414,17 @@ class HaConfigIntegrationPage extends SubscribeMixin(LitElement) { ha-alert:first-of-type { margin-top: 16px; } + ha-list-item-new { + position: relative; + } ha-list-item-new.discovered { height: 72px; } ha-list-item-new.config_entry::after { position: absolute; - top: 8px; + top: 0; right: 0; - bottom: 8px; + bottom: 0; left: 0; opacity: 0.12; pointer-events: none; From 0b391eafcfb678517a676b8759823e79d6f8efe8 Mon Sep 17 00:00:00 2001 From: Simon Lamon <32477463+silamon@users.noreply.github.com> Date: Thu, 13 Jun 2024 13:31:30 +0200 Subject: [PATCH 2/6] Fix diagnostic download not downloading (#21078) --- .../config/integrations/ha-config-integration-page.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/panels/config/integrations/ha-config-integration-page.ts b/src/panels/config/integrations/ha-config-integration-page.ts index dafa45cde0..41c2bf18a7 100644 --- a/src/panels/config/integrations/ha-config-integration-page.ts +++ b/src/panels/config/integrations/ha-config-integration-page.ts @@ -754,7 +754,7 @@ class HaConfigIntegrationPage extends SubscribeMixin(LitElement) { ${item.disabled_by && devices.length ? html` @@ -769,7 +769,7 @@ class HaConfigIntegrationPage extends SubscribeMixin(LitElement) { : ""} ${item.disabled_by && services.length ? html` @@ -787,7 +787,7 @@ class HaConfigIntegrationPage extends SubscribeMixin(LitElement) { ${item.disabled_by && entities.length ? html` From 4991d52fcc030bf6019b6e2d6829ed9d3eadc55e Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Thu, 13 Jun 2024 02:04:27 -0400 Subject: [PATCH 3/6] Hide notify entities from generated dashboard (#21075) Hide notify entiites from generated dashboard --- src/panels/lovelace/common/generate-lovelace-config.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/panels/lovelace/common/generate-lovelace-config.ts b/src/panels/lovelace/common/generate-lovelace-config.ts index 819001bb53..d1da6d9c69 100644 --- a/src/panels/lovelace/common/generate-lovelace-config.ts +++ b/src/panels/lovelace/common/generate-lovelace-config.ts @@ -37,15 +37,16 @@ const HIDE_DOMAIN = new Set([ "configurator", "conversation", "device_tracker", + "event", "geo_location", + "notify", "persistent_notification", "script", - "sun", - "zone", - "event", - "tts", "stt", + "sun", "todo", + "tts", + "zone", ]); const HIDE_PLATFORM = new Set(["mobile_app"]); From 06d82a4925b2832904495abd2fd04c6bbab81f6a Mon Sep 17 00:00:00 2001 From: Steve Repsher Date: Wed, 12 Jun 2024 14:45:57 -0400 Subject: [PATCH 4/6] Do not inject Intl polyfill into ecma402-abstract package (#21074) --- build-scripts/bundle.cjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-scripts/bundle.cjs b/build-scripts/bundle.cjs index 430110936f..df95d10d22 100644 --- a/build-scripts/bundle.cjs +++ b/build-scripts/bundle.cjs @@ -157,7 +157,7 @@ module.exports.babelOptions = ({ latestBuild, isProdBuild, isTestBuild }) => ({ exclude: [ path.join(paths.polymer_dir, "src/resources/polyfills"), ...[ - "@formatjs/intl-\\w+", + "@formatjs/(?:ecma402-abstract|intl-\\w+)", "@lit-labs/virtualizer/polyfills", "@webcomponents/scoped-custom-element-registry", "element-internals-polyfill", From e8eefaf1d3ef285c1b169fb00b292f848927915f Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Wed, 12 Jun 2024 13:40:44 +0200 Subject: [PATCH 5/6] Fix current mode not selected in card feature (#21063) --- .../card-features/common/filter-modes.ts | 8 ++--- .../hui-alarm-modes-card-feature.ts | 35 +++++-------------- 2 files changed, 12 insertions(+), 31 deletions(-) diff --git a/src/panels/lovelace/card-features/common/filter-modes.ts b/src/panels/lovelace/card-features/common/filter-modes.ts index d1e81385df..0e59b35c47 100644 --- a/src/panels/lovelace/card-features/common/filter-modes.ts +++ b/src/panels/lovelace/card-features/common/filter-modes.ts @@ -1,7 +1,7 @@ -export const filterModes = ( - supportedModes: string[] | undefined, - selectedModes: string[] | undefined -): string[] => +export const filterModes = ( + supportedModes: T[] | undefined, + selectedModes: T[] | undefined +): T[] => selectedModes ? selectedModes.filter((mode) => (supportedModes || []).includes(mode)) : supportedModes || []; diff --git a/src/panels/lovelace/card-features/hui-alarm-modes-card-feature.ts b/src/panels/lovelace/card-features/hui-alarm-modes-card-feature.ts index 9b8ef39c99..2572f237c4 100644 --- a/src/panels/lovelace/card-features/hui-alarm-modes-card-feature.ts +++ b/src/panels/lovelace/card-features/hui-alarm-modes-card-feature.ts @@ -6,7 +6,6 @@ import { styleMap } from "lit/directives/style-map"; import memoizeOne from "memoize-one"; import { computeDomain } from "../../../common/entity/compute_domain"; import { stateColorCss } from "../../../common/entity/state_color"; -import { supportsFeature } from "../../../common/entity/supports-feature"; import "../../../components/ha-control-button"; import "../../../components/ha-control-button-group"; import "../../../components/ha-control-select"; @@ -70,37 +69,18 @@ class HuiAlarmModeCardFeature } } - private _modes = memoizeOne( - ( - stateObj: AlarmControlPanelEntity, - selectedModes: AlarmMode[] | undefined - ) => { - if (!selectedModes) { - return []; - } - - return (Object.keys(ALARM_MODES) as AlarmMode[]).filter((mode) => { - const feature = ALARM_MODES[mode].feature; - return ( - (!feature || supportsFeature(stateObj, feature)) && - selectedModes.includes(mode) - ); - }); - } - ); - - private _getCurrentMode(stateObj: AlarmControlPanelEntity) { - return this._modes(stateObj, this._config?.modes).find( - (mode) => mode === stateObj.state - ); - } + private _getCurrentMode = memoizeOne((stateObj: AlarmControlPanelEntity) => { + const supportedModes = supportedAlarmModes(stateObj); + return supportedModes.find((mode) => mode === stateObj.state); + }); private async _valueChanged(ev: CustomEvent) { + if (!this.stateObj) return; const mode = (ev.detail as any).value as AlarmMode; - if (mode === this.stateObj!.state) return; + if (mode === this.stateObj.state) return; - const oldMode = this._getCurrentMode(this.stateObj!); + const oldMode = this._getCurrentMode(this.stateObj); this._currentMode = mode; try { @@ -153,6 +133,7 @@ class HuiAlarmModeCardFeature `; } + return html`
Date: Thu, 13 Jun 2024 20:49:43 +0200 Subject: [PATCH 6/6] Bumped version to 20240610.1 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index bf005d0024..4d37bbb731 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "home-assistant-frontend" -version = "20240610.0" +version = "20240610.1" license = {text = "Apache-2.0"} description = "The Home Assistant frontend" readme = "README.md"