Skip to content

Commit 2baafe6

Browse files
authored
Add hint to reorder areas and floors (#28189)
1 parent ce52bba commit 2baafe6

File tree

3 files changed

+24
-2
lines changed

3 files changed

+24
-2
lines changed

src/panels/config/areas/ha-config-areas-dashboard.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ export class HaConfigAreasDashboard extends LitElement {
8484

8585
@property({ attribute: false }) public route!: Route;
8686

87+
private _searchParms = new URLSearchParams(window.location.search);
88+
8789
@state() private _hierarchy?: AreasFloorHierarchy;
8890

8991
private _blockHierarchyUpdate = false;
@@ -167,7 +169,9 @@ export class HaConfigAreasDashboard extends LitElement {
167169
.hass=${this.hass}
168170
.narrow=${this.narrow}
169171
.isWide=${this.isWide}
170-
back-path="/config"
172+
.backPath=${this._searchParms.has("historyBack")
173+
? undefined
174+
: "/config"}
171175
.tabs=${configSections.areas}
172176
.route=${this.route}
173177
has-fab

src/panels/home/dialogs/dialog-edit-home.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { css, html, LitElement, nothing } from "lit";
22
import { customElement, property, state } from "lit/decorators";
33
import { fireEvent } from "../../../common/dom/fire_event";
44
import "../../../components/entity/ha-entities-picker";
5+
import "../../../components/ha-alert";
56
import "../../../components/ha-button";
67
import "../../../components/ha-dialog-footer";
78
import "../../../components/ha-wa-dialog";
@@ -78,6 +79,16 @@ export class DialogEditHome
7879
@value-changed=${this._favoriteEntitiesChanged}
7980
></ha-entities-picker>
8081
82+
<ha-alert alert-type="info">
83+
${this.hass.localize("ui.panel.home.editor.areas_hint", {
84+
areas_page: html`<a
85+
href="/config/areas?historyBack=1"
86+
@click=${this.closeDialog}
87+
>${this.hass.localize("ui.panel.home.editor.areas_page")}</a
88+
>`,
89+
})}
90+
</ha-alert>
91+
8192
<ha-dialog-footer slot="footer">
8293
<ha-button
8394
appearance="plain"
@@ -140,6 +151,11 @@ export class DialogEditHome
140151
ha-entities-picker {
141152
display: block;
142153
}
154+
155+
ha-alert {
156+
display: block;
157+
margin-top: var(--ha-space-4);
158+
}
143159
`,
144160
];
145161
}

src/translations/en.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2227,7 +2227,9 @@
22272227
"title": "Edit home page",
22282228
"description": "Configure your home page display preferences.",
22292229
"favorite_entities_helper": "Display your favorite entities. Home Assistant will still suggest based on commonly used up to 8 slots.",
2230-
"save_failed": "Failed to save home page configuration"
2230+
"save_failed": "Failed to save home page configuration",
2231+
"areas_hint": "You can rearrange your floors and areas in the order that best represents your house on the {areas_page}.",
2232+
"areas_page": "areas page"
22312233
}
22322234
},
22332235
"my": {

0 commit comments

Comments
 (0)