From e6cfe74cac987dfb03354331146477268a806981 Mon Sep 17 00:00:00 2001 From: karwosts <32912880+karwosts@users.noreply.github.com> Date: Wed, 1 Nov 2023 01:37:26 -0700 Subject: [PATCH 01/11] Fix choose add option (#18493) --- .../action/types/ha-automation-action-choose.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/panels/config/automation/action/types/ha-automation-action-choose.ts b/src/panels/config/automation/action/types/ha-automation-action-choose.ts index 90fa1a22f6ff..30839ab60cb5 100644 --- a/src/panels/config/automation/action/types/ha-automation-action-choose.ts +++ b/src/panels/config/automation/action/types/ha-automation-action-choose.ts @@ -342,7 +342,7 @@ export class HaChooseAction extends LitElement implements ActionElement { private _duplicateOption(ev) { const index = (ev.target as any).idx; - this._addOption(deepClone(ensureArray(this.action.choose)[index])); + this._createOption(deepClone(ensureArray(this.action.choose)[index])); } protected firstUpdated() { @@ -399,11 +399,15 @@ export class HaChooseAction extends LitElement implements ActionElement { }); } - private _addOption(opt?: ChooseActionChoice) { + private _addOption() { + this._createOption({ conditions: [], sequence: [] }); + } + + private _createOption(opt: ChooseActionChoice) { const choose = this.action.choose ? [...ensureArray(this.action.choose)] : []; - choose.push(opt ?? { conditions: [], sequence: [] }); + choose.push(opt); fireEvent(this, "value-changed", { value: { ...this.action, choose }, }); From ddca7584efae3d89e490438af14faf81af599c04 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Wed, 1 Nov 2023 10:21:08 +0100 Subject: [PATCH 02/11] Bumped version to 20231030.1 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 30f2f89d3cc8..be91348a395b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "home-assistant-frontend" -version = "20231030.0" +version = "20231030.1" license = {text = "Apache-2.0"} description = "The Home Assistant frontend" readme = "README.md" From 0566889a1e98f4ae610d9ab3ef95eed6af2f16c3 Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Tue, 7 Nov 2023 12:04:04 +0100 Subject: [PATCH 03/11] Use strict comparison for above condition in conditional card (#18560) --- src/panels/lovelace/common/validate-condition.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/panels/lovelace/common/validate-condition.ts b/src/panels/lovelace/common/validate-condition.ts index b6059292dbaa..a65b666aece7 100644 --- a/src/panels/lovelace/common/validate-condition.ts +++ b/src/panels/lovelace/common/validate-condition.ts @@ -71,7 +71,7 @@ function checkStateNumericCondition( return ( (condition.above == null || condition.above < numericState) && - (condition.below == null || condition.below >= numericState) + (condition.below == null || condition.below > numericState) ); } From 310a08f3e619d9d3357c5ffadf212ec465ed1014 Mon Sep 17 00:00:00 2001 From: karwosts <32912880+karwosts@users.noreply.github.com> Date: Wed, 1 Nov 2023 01:37:26 -0700 Subject: [PATCH 04/11] Fix choose add option (#18493) From 533e2bed8a34d1b18494807d8b1694851c83b17c Mon Sep 17 00:00:00 2001 From: Kendell R Date: Wed, 1 Nov 2023 02:38:02 -0700 Subject: [PATCH 05/11] Properly set direction styles (#18483) --- src/common/util/compute_rtl.ts | 1 + src/state/translations-mixin.ts | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/util/compute_rtl.ts b/src/common/util/compute_rtl.ts index 7e71b1b15bd0..39719bee4380 100644 --- a/src/common/util/compute_rtl.ts +++ b/src/common/util/compute_rtl.ts @@ -23,6 +23,7 @@ export function computeDirectionStyles(isRTL: boolean, element: LitElement) { } export function setDirectionStyles(direction: string, element: LitElement) { + document.dir = direction; element.style.direction = direction; element.style.setProperty("--direction", direction); element.style.setProperty( diff --git a/src/state/translations-mixin.ts b/src/state/translations-mixin.ts index 66b86a140a25..db00f9c3c71b 100644 --- a/src/state/translations-mixin.ts +++ b/src/state/translations-mixin.ts @@ -268,7 +268,6 @@ export default >(superClass: T) => private _applyDirection(hass: HomeAssistant) { const direction = computeRTLDirection(hass); - document.dir = direction; setDirectionStyles(direction, this); } From 6728e8d107b4e748602bc64c21346d80a25bbd86 Mon Sep 17 00:00:00 2001 From: David Bell Date: Tue, 7 Nov 2023 02:09:54 +1100 Subject: [PATCH 06/11] Don't display hidden/non-visible calendars on the Calendar panel (#18541) --- src/data/calendar.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/data/calendar.ts b/src/data/calendar.ts index 178ef3544ece..85efa30686af 100644 --- a/src/data/calendar.ts +++ b/src/data/calendar.ts @@ -139,7 +139,8 @@ export const getCalendars = (hass: HomeAssistant): Calendar[] => .filter( (eid) => computeDomain(eid) === "calendar" && - !isUnavailableState(hass.states[eid].state) + !isUnavailableState(hass.states[eid].state) && + hass.entities[eid]?.hidden !== true ) .sort() .map((eid, idx) => ({ From 06d76be2c29dcd06f69fd739ea28c0b6b4c50608 Mon Sep 17 00:00:00 2001 From: Simon Lamon <32477463+silamon@users.noreply.github.com> Date: Mon, 6 Nov 2023 15:53:23 +0100 Subject: [PATCH 07/11] Fix refresh in developer state tools (#18532) --- src/panels/developer-tools/state/developer-tools-state.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/panels/developer-tools/state/developer-tools-state.ts b/src/panels/developer-tools/state/developer-tools-state.ts index a47960a44288..ba32df918f23 100644 --- a/src/panels/developer-tools/state/developer-tools-state.ts +++ b/src/panels/developer-tools/state/developer-tools-state.ts @@ -167,7 +167,7 @@ class HaPanelDevState extends LitElement { )} @@ -349,6 +349,10 @@ class HaPanelDevState extends LitElement { private _entityIdChanged(ev: CustomEvent) { this._entityId = ev.detail.value; + this._updateEntity(); + } + + private _updateEntity() { if (!this._entityId) { this._entity = undefined; this._state = ""; From d06fdeb265f6d4030a1e7d702db8f8ccbf166dfe Mon Sep 17 00:00:00 2001 From: Kendell R Date: Mon, 6 Nov 2023 01:02:00 -0800 Subject: [PATCH 08/11] Fix "ttme" typo on the demo page (#18543) --- src/translations/en.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/translations/en.json b/src/translations/en.json index 8a38c8634e01..cc5ce91f5bd4 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -5662,7 +5662,7 @@ "hdmi_input": "HDMI input", "hdmi_switcher": "HDMI switcher", "volume": "Volume", - "total_tv_time": "Total TV Ttme", + "total_tv_time": "Total TV Time", "turn_tv_off": "Turn television off", "air": "Air" }, From 749c2ab8ac86b52ac6be1ed7d39d8c17a4740896 Mon Sep 17 00:00:00 2001 From: tzagim <2285958+tzagim@users.noreply.github.com> Date: Mon, 6 Nov 2023 11:02:44 +0200 Subject: [PATCH 09/11] Fix for RTL (#18509) --- .../components/climate/ha-more-info-climate-temperature.ts | 1 + src/dialogs/more-info/controls/more-info-climate.ts | 1 + src/dialogs/more-info/controls/more-info-humidifier.ts | 1 + src/dialogs/more-info/controls/more-info-water_heater.ts | 1 + src/dialogs/more-info/controls/more-info-weather.ts | 1 + 5 files changed, 5 insertions(+) diff --git a/src/dialogs/more-info/components/climate/ha-more-info-climate-temperature.ts b/src/dialogs/more-info/components/climate/ha-more-info-climate-temperature.ts index f0b1954f5581..c03f63f57e97 100644 --- a/src/dialogs/more-info/components/climate/ha-more-info-climate-temperature.ts +++ b/src/dialogs/more-info/components/climate/ha-more-info-climate-temperature.ts @@ -415,6 +415,7 @@ export class HaMoreInfoClimateTemperature extends LitElement { line-height: 64px; letter-spacing: -0.25px; margin: 0; + direction: ltr; } .temperature span { display: inline-flex; diff --git a/src/dialogs/more-info/controls/more-info-climate.ts b/src/dialogs/more-info/controls/more-info-climate.ts index c1e4cb0999ef..173fe7905a7f 100644 --- a/src/dialogs/more-info/controls/more-info-climate.ts +++ b/src/dialogs/more-info/controls/more-info-climate.ts @@ -434,6 +434,7 @@ class MoreInfoClimate extends LitElement { font-size: 22px; font-weight: 500; line-height: 28px; + direction: ltr; } ha-select { width: 100%; diff --git a/src/dialogs/more-info/controls/more-info-humidifier.ts b/src/dialogs/more-info/controls/more-info-humidifier.ts index d919753c86ba..25b8e60e0bcc 100644 --- a/src/dialogs/more-info/controls/more-info-humidifier.ts +++ b/src/dialogs/more-info/controls/more-info-humidifier.ts @@ -250,6 +250,7 @@ class MoreInfoHumidifier extends LitElement { font-size: 22px; font-weight: 500; line-height: 28px; + direction: ltr; } `, ]; diff --git a/src/dialogs/more-info/controls/more-info-water_heater.ts b/src/dialogs/more-info/controls/more-info-water_heater.ts index 99269b6e2c4b..3e0a77fa5cb5 100644 --- a/src/dialogs/more-info/controls/more-info-water_heater.ts +++ b/src/dialogs/more-info/controls/more-info-water_heater.ts @@ -243,6 +243,7 @@ class MoreInfoWaterHeater extends LitElement { font-size: 22px; font-weight: 500; line-height: 28px; + direction: ltr; } `, ]; diff --git a/src/dialogs/more-info/controls/more-info-weather.ts b/src/dialogs/more-info/controls/more-info-weather.ts index 5da649ae4f0e..7e1bd84c2b3e 100644 --- a/src/dialogs/more-info/controls/more-info-weather.ts +++ b/src/dialogs/more-info/controls/more-info-weather.ts @@ -356,6 +356,7 @@ class MoreInfoWeather extends LitElement { .templow { min-width: 48px; text-align: right; + direction: ltr; } .templow { From 00a311bd63e89436a20667ab8bfe97cb0e72057d Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Thu, 9 Nov 2023 18:23:17 +0100 Subject: [PATCH 10/11] Bumped version to 20231030.2 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index be91348a395b..0285f255b9a5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "home-assistant-frontend" -version = "20231030.1" +version = "20231030.2" license = {text = "Apache-2.0"} description = "The Home Assistant frontend" readme = "README.md" From 18b5215ce6e686cea2029828f2b9bdd89d7feb85 Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Thu, 9 Nov 2023 10:00:24 +0100 Subject: [PATCH 11/11] Only update dev tools yaml editor on entity change or submit (#18575) Co-authored-by: Simon Lamon <32477463+silamon@users.noreply.github.com> --- .../state/developer-tools-state.ts | 42 ++++++++++++------- 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/src/panels/developer-tools/state/developer-tools-state.ts b/src/panels/developer-tools/state/developer-tools-state.ts index ba32df918f23..d46074b7afc5 100644 --- a/src/panels/developer-tools/state/developer-tools-state.ts +++ b/src/panels/developer-tools/state/developer-tools-state.ts @@ -1,38 +1,39 @@ -import { addHours } from "date-fns/esm"; -import "@material/mwc-button"; import { mdiClipboardTextMultipleOutline, mdiInformationOutline, mdiRefresh, } from "@mdi/js"; -import { CSSResultGroup, LitElement, css, html, nothing } from "lit"; -import { customElement, property, state } from "lit/decorators"; +import { addHours } from "date-fns/esm"; import { HassEntities, HassEntity, HassEntityAttributeBase, } from "home-assistant-js-websocket"; -import memoizeOne from "memoize-one"; import { dump } from "js-yaml"; +import { CSSResultGroup, LitElement, css, html, nothing } from "lit"; +import { customElement, property, query, state } from "lit/decorators"; +import memoizeOne from "memoize-one"; import { formatDateTimeWithSeconds } from "../../../common/datetime/format_date_time"; -import { computeRTL } from "../../../common/util/compute_rtl"; +import { storage } from "../../../common/decorators/storage"; +import { fireEvent } from "../../../common/dom/fire_event"; +import { toggleAttribute } from "../../../common/dom/toggle_attribute"; import { escapeRegExp } from "../../../common/string/escape_regexp"; +import { computeRTL } from "../../../common/util/compute_rtl"; import { copyToClipboard } from "../../../common/util/copy-clipboard"; import "../../../components/entity/ha-entity-picker"; -import "../../../components/ha-yaml-editor"; +import "../../../components/ha-alert"; +import "../../../components/ha-button"; +import "../../../components/ha-checkbox"; +import "../../../components/ha-expansion-panel"; import "../../../components/ha-icon-button"; import "../../../components/ha-svg-icon"; -import "../../../components/ha-checkbox"; import "../../../components/ha-tip"; -import "../../../components/ha-alert"; +import "../../../components/ha-yaml-editor"; +import type { HaYamlEditor } from "../../../components/ha-yaml-editor"; import "../../../components/search-input"; -import "../../../components/ha-expansion-panel"; import { showAlertDialog } from "../../../dialogs/generic/show-dialog-box"; import { haStyle } from "../../../resources/styles"; import { HomeAssistant } from "../../../types"; -import { fireEvent } from "../../../common/dom/fire_event"; -import { toggleAttribute } from "../../../common/dom/toggle_attribute"; -import { storage } from "../../../common/decorators/storage"; @customElement("developer-tools-state") class HaPanelDevState extends LitElement { @@ -70,6 +71,8 @@ class HaPanelDevState extends LitElement { @property({ type: Boolean, reflect: true }) public rtl = false; + @query("ha-yaml-editor") private _yamlEditor?: HaYamlEditor; + private _filteredEntities = memoizeOne( ( entityFilter: string, @@ -151,20 +154,19 @@ class HaPanelDevState extends LitElement { )}

- ${this.hass.localize( "ui.panel.developer-tools.tabs.states.set_state" - )}