From d6684c58066249b33395a54f5a68cf3841a53349 Mon Sep 17 00:00:00 2001
From: Bram Kragten
Date: Wed, 27 Dec 2023 17:46:17 +0100
Subject: [PATCH 1/7] Revert hide automation desc in advanced mode (#19158)
---
src/panels/config/automation/manual-automation-editor.ts | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/src/panels/config/automation/manual-automation-editor.ts b/src/panels/config/automation/manual-automation-editor.ts
index 811ea2c3fd0a..042fca491ae3 100644
--- a/src/panels/config/automation/manual-automation-editor.ts
+++ b/src/panels/config/automation/manual-automation-editor.ts
@@ -85,8 +85,7 @@ export class HaManualAutomationEditor extends LitElement {
>
- ${!this.hass.userData?.showAdvanced &&
- !ensureArray(this.config.trigger)?.length
+ ${!ensureArray(this.config.trigger)?.length
? html`
${this.hass.localize(
"ui.panel.config.automation.editor.triggers.description"
@@ -125,8 +124,7 @@ export class HaManualAutomationEditor extends LitElement {
>
- ${!this.hass.userData?.showAdvanced &&
- !ensureArray(this.config.condition)?.length
+ ${!ensureArray(this.config.condition)?.length
? html`
${this.hass.localize(
"ui.panel.config.automation.editor.conditions.description",
@@ -165,8 +163,7 @@ export class HaManualAutomationEditor extends LitElement {
- ${!this.hass.userData?.showAdvanced &&
- !ensureArray(this.config.action)?.length
+ ${!ensureArray(this.config.action)?.length
? html`
${this.hass.localize(
"ui.panel.config.automation.editor.actions.description"
From 5b11e0ce29ae3acbe7d2f09caec1e8bf90609557 Mon Sep 17 00:00:00 2001
From: Simon Lamon <32477463+silamon@users.noreply.github.com>
Date: Wed, 27 Dec 2023 20:26:17 +0100
Subject: [PATCH 2/7] Fix self referencing translation (#19159)
---
src/translations/en.json | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/translations/en.json b/src/translations/en.json
index 6d4253fd3f8f..5ceb47ab7c33 100644
--- a/src/translations/en.json
+++ b/src/translations/en.json
@@ -1119,8 +1119,8 @@
},
"valve": {
"switch_mode": {
- "button": "[%key:ui::dialogs::more_info_control::valve::switch_mode::button%]",
- "position": "[%key:ui::dialogs::more_info_control::valve::switch_mode::position%]"
+ "button": "[%key:ui::dialogs::more_info_control::cover::switch_mode::button%]",
+ "position": "[%key:ui::dialogs::more_info_control::cover::switch_mode::position%]"
}
}
},
From b180a587bf56ac25084fb639ccaca76c7012b4f8 Mon Sep 17 00:00:00 2001
From: Bram Kragten
Date: Thu, 28 Dec 2023 14:18:18 +0100
Subject: [PATCH 3/7] Address feedback of automation editor (#19167)
---
src/components/ha-list-item.ts | 1 +
src/data/action.ts | 1 +
src/panels/config/automation/add-automation-element-dialog.ts | 4 ++--
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/components/ha-list-item.ts b/src/components/ha-list-item.ts
index d3481cc192e6..dcd13f0f7074 100644
--- a/src/components/ha-list-item.ts
+++ b/src/components/ha-list-item.ts
@@ -46,6 +46,7 @@ export class HaListItem extends ListItemBase {
.mdc-deprecated-list-item__meta {
display: var(--mdc-list-item-meta-display);
align-items: center;
+ flex-shrink: 0;
}
:host([graphic="icon"]:not([twoline]))
.mdc-deprecated-list-item__graphic {
diff --git a/src/data/action.ts b/src/data/action.ts
index a7ed018409f4..2c5f2aa12578 100644
--- a/src/data/action.ts
+++ b/src/data/action.ts
@@ -67,6 +67,7 @@ export const ACTION_GROUPS: AutomationElementGroup = {
icon: mdiDotsHorizontal,
members: {
event: {},
+ service: {},
},
},
} as const;
diff --git a/src/panels/config/automation/add-automation-element-dialog.ts b/src/panels/config/automation/add-automation-element-dialog.ts
index 6c830976c54f..fdf1d97f4086 100644
--- a/src/panels/config/automation/add-automation-element-dialog.ts
+++ b/src/panels/config/automation/add-automation-element-dialog.ts
@@ -452,8 +452,8 @@ class DialogAddAutomationElement extends LitElement implements HassDialog {
itemRoles="option"
rootTabbable
style=${styleMap({
- width: `${this._width}px`,
- height: `${this._height}px`,
+ width: this._width ? `${this._width}px` : "auto",
+ height: this._height ? `${Math.min(468, this._height)}px` : "auto",
})}
>
${this._params.clipboardItem &&
From b11563d618a1254f3722fc0ac547772affb30c95 Mon Sep 17 00:00:00 2001
From: Bram Kragten
Date: Thu, 28 Dec 2023 15:32:31 +0100
Subject: [PATCH 4/7] Small automation editor fixes (#19160)
---
.../config/automation/ha-automation-picker.ts | 14 ++++++++------
src/panels/config/scene/ha-scene-dashboard.ts | 6 ++----
src/panels/config/script/ha-script-picker.ts | 6 ++----
src/translations/en.json | 2 +-
4 files changed, 13 insertions(+), 15 deletions(-)
diff --git a/src/panels/config/automation/ha-automation-picker.ts b/src/panels/config/automation/ha-automation-picker.ts
index 46974adb07ce..a29a88d6a35c 100644
--- a/src/panels/config/automation/ha-automation-picker.ts
+++ b/src/panels/config/automation/ha-automation-picker.ts
@@ -328,7 +328,7 @@ class HaAutomationPicker extends LitElement {
>
${!this.automations.length
- ? html`
+ ? html`
${this.hass.localize(
@@ -338,7 +338,9 @@ class HaAutomationPicker extends LitElement {
${this.hass.localize(
"ui.panel.config.automation.picker.empty_text_1"
- )}
+ )}
+
+
${this.hass.localize(
"ui.panel.config.automation.picker.empty_text_2"
)}
@@ -349,9 +351,7 @@ class HaAutomationPicker extends LitElement {
rel="noreferrer"
>
- ${this.hass.localize(
- "ui.panel.config.automation.picker.learn_more"
- )}
+ ${this.hass.localize("ui.panel.config.common.learn_more")}
`
@@ -513,7 +513,9 @@ class HaAutomationPicker extends LitElement {
target="_blank"
rel="noreferrer"
>
- ${this.hass.localize("ui.panel.config.common.learn_more")}
+ ${this.hass.localize(
+ "ui.panel.config.automation.picker.learn_more"
+ )}
`,
diff --git a/src/panels/config/scene/ha-scene-dashboard.ts b/src/panels/config/scene/ha-scene-dashboard.ts
index 09b35fcad172..0d3f9a7a0561 100644
--- a/src/panels/config/scene/ha-scene-dashboard.ts
+++ b/src/panels/config/scene/ha-scene-dashboard.ts
@@ -265,9 +265,7 @@ class HaSceneDashboard extends LitElement {
rel="noreferrer"
>
- ${this.hass.localize(
- "ui.panel.config.scene.picker.learn_more"
- )}
+ ${this.hass.localize("ui.panel.config.common.learn_more")}
`
@@ -370,7 +368,7 @@ class HaSceneDashboard extends LitElement {
target="_blank"
rel="noreferrer"
>
- ${this.hass.localize("ui.panel.config.common.learn_more")}
+ ${this.hass.localize("ui.panel.config.scene.picker.learn_more")}
`,
diff --git a/src/panels/config/script/ha-script-picker.ts b/src/panels/config/script/ha-script-picker.ts
index 06fca323d1cd..ac2ace77675e 100644
--- a/src/panels/config/script/ha-script-picker.ts
+++ b/src/panels/config/script/ha-script-picker.ts
@@ -294,9 +294,7 @@ class HaScriptPicker extends LitElement {
rel="noreferrer"
>
- ${this.hass.localize(
- "ui.panel.config.script.picker.learn_more"
- )}
+ ${this.hass.localize("ui.panel.config.common.learn_more")}
`
@@ -420,7 +418,7 @@ class HaScriptPicker extends LitElement {
target="_blank"
rel="noreferrer"
>
- ${this.hass.localize("ui.panel.config.common.learn_more")}
+ ${this.hass.localize("ui.panel.config.script.picker.learn_more")}
`,
diff --git a/src/translations/en.json b/src/translations/en.json
index 5ceb47ab7c33..1e498b7ac444 100644
--- a/src/translations/en.json
+++ b/src/translations/en.json
@@ -2759,7 +2759,7 @@
"preset_mode": "Preset mode"
},
"description": {
- "picker": "If something happens to a device. Great way to start."
+ "picker": "If a device is in a certain state. Great way to start."
}
},
"not": {
From 1916dff57bbb2cfbb67bb21f554bb1c56ae3efa0 Mon Sep 17 00:00:00 2001
From: Bram Kragten
Date: Thu, 28 Dec 2023 15:32:40 +0100
Subject: [PATCH 5/7] Keep todo item selected when checked/unchecked (#19168)
* Keep todo item selected when checked/unchecked
* update label when in reoder mode
---
.../lovelace/cards/hui-todo-list-card.ts | 22 +++++++++++++++----
src/panels/todo/dialog-todo-item-editor.ts | 1 -
src/translations/en.json | 1 +
3 files changed, 19 insertions(+), 5 deletions(-)
diff --git a/src/panels/lovelace/cards/hui-todo-list-card.ts b/src/panels/lovelace/cards/hui-todo-list-card.ts
index 6dbc1c815006..6c8e75e3b1f9 100644
--- a/src/panels/lovelace/cards/hui-todo-list-card.ts
+++ b/src/panels/lovelace/cards/hui-todo-list-card.ts
@@ -1,4 +1,5 @@
import "@material/mwc-list/mwc-list";
+import type { List } from "@material/mwc-list/mwc-list";
import {
mdiClock,
mdiDelete,
@@ -229,7 +230,7 @@ export class HuiTodoListCard extends LitElement implements LovelaceCard {
: nothing}
${uncheckedItems.length
- ? html`