From 04b7749f85dbe7a95a2bd087577555d1a967b740 Mon Sep 17 00:00:00 2001 From: Zack Barett Date: Mon, 21 Sep 2020 06:27:50 -0500 Subject: [PATCH 1/6] Fix Calendar Title from not removing (#7058) --- .../hui-calendar-card-editor.ts | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/panels/lovelace/editor/config-elements/hui-calendar-card-editor.ts b/src/panels/lovelace/editor/config-elements/hui-calendar-card-editor.ts index 5a7cd7049a..b9b736c783 100644 --- a/src/panels/lovelace/editor/config-elements/hui-calendar-card-editor.ts +++ b/src/panels/lovelace/editor/config-elements/hui-calendar-card-editor.ts @@ -1,29 +1,29 @@ import { customElement, html, + internalProperty, LitElement, property, TemplateResult, - internalProperty, } from "lit-element"; +import { + array, + assert, + boolean, + object, + optional, + string, + union, +} from "superstruct"; import { fireEvent } from "../../../../common/dom/fire_event"; +import "../../../../components/entity/ha-entities-picker"; import type { HomeAssistant } from "../../../../types"; import type { CalendarCardConfig } from "../../cards/types"; import "../../components/hui-entity-editor"; -import "../../../../components/entity/ha-entities-picker"; import "../../components/hui-theme-select-editor"; import type { LovelaceCardEditor } from "../../types"; import type { EditorTarget, EntitiesEditorEvent } from "../types"; import { configElementStyle } from "./config-elements-style"; -import { - string, - optional, - object, - boolean, - array, - union, - assert, -} from "superstruct"; const cardConfigStruct = object({ type: string(), @@ -113,6 +113,7 @@ export class HuiCalendarCardEditor extends LitElement this._config = { ...this._config, entities: ev.detail.value }; } else if (target.configValue) { if (target.value === "") { + this._config = { ...this._config }; delete this._config[target.configValue!]; } else { this._config = { From 948261d1d1770c41f38edc421bd861155d3c8874 Mon Sep 17 00:00:00 2001 From: Brenden Crowie Date: Wed, 23 Sep 2020 03:52:32 -0400 Subject: [PATCH 2/6] Corrected password changed message in User panel (#7111) --- src/panels/config/users/dialog-user-detail.ts | 2 +- src/translations/en.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/panels/config/users/dialog-user-detail.ts b/src/panels/config/users/dialog-user-detail.ts index d662248f02..7e7e95c97c 100644 --- a/src/panels/config/users/dialog-user-detail.ts +++ b/src/panels/config/users/dialog-user-detail.ts @@ -256,7 +256,7 @@ class DialogUserDetail extends LitElement { await adminChangePassword(this.hass, this._params!.entry.id, newPassword); showAlertDialog(this, { title: this.hass.localize( - "ui.panel.config.users.add_user.password_changed" + "ui.panel.config.users.editor.password_changed" ), }); } diff --git a/src/translations/en.json b/src/translations/en.json index 5504fd17df..220127f8d5 100755 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -1737,7 +1737,7 @@ "name": "Name", "change_password": "Change password", "new_password": "New Password", - "password_changed": "The password is changed!", + "password_changed": "Password was changed successfully", "activate_user": "Activate user", "deactivate_user": "Deactivate user", "delete_user": "Delete user", From d25f371d6ce49fe6f44ff1ee6d96db83e848f3bf Mon Sep 17 00:00:00 2001 From: Zack Arnett Date: Fri, 18 Sep 2020 14:56:50 -0500 Subject: [PATCH 3/6] make the browser load --- src/components/media-player/ha-media-player-browse.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/components/media-player/ha-media-player-browse.ts b/src/components/media-player/ha-media-player-browse.ts index 02cb713aa5..e8b42a973c 100644 --- a/src/components/media-player/ha-media-player-browse.ts +++ b/src/components/media-player/ha-media-player-browse.ts @@ -22,6 +22,7 @@ import { styleMap } from "lit-html/directives/style-map"; import { fireEvent } from "../../common/dom/fire_event"; import { computeRTLDirection } from "../../common/util/compute_rtl"; import { debounce } from "../../common/util/debounce"; +import type { MediaPlayerItem } from "../../data/media-player"; import { browseLocalMediaPlayer, browseMediaPlayer, @@ -30,7 +31,6 @@ import { MediaPickedEvent, MediaPlayerBrowseAction, } from "../../data/media-player"; -import type { MediaPlayerItem } from "../../data/media-player"; import { showAlertDialog } from "../../dialogs/generic/show-dialog-box"; import { installResizeObserver } from "../../panels/lovelace/common/install-resize-observer"; import { haStyle } from "../../resources/styles"; @@ -480,6 +480,7 @@ export class HaMediaPlayerBrowse extends LitElement { mediaContentId?: string, mediaContentType?: string ): Promise { + this._loading = true; const itemData = this.entityId !== BROWSER_PLAYER ? await browseMediaPlayer( @@ -490,6 +491,7 @@ export class HaMediaPlayerBrowse extends LitElement { ) : await browseLocalMediaPlayer(this.hass, mediaContentId); + this._loading = false; return itemData; } @@ -566,6 +568,13 @@ export class HaMediaPlayerBrowse extends LitElement { flex-direction: column; } + ha-circular-progress { + --mdc-theme-primary: var(--primary-color); + display: flex; + justify-content: center; + margin-top: 40px; + } + .container { padding: 16px; } From 1afa4d2868e696041eb7e8c88e0eec4096529e43 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Wed, 23 Sep 2020 12:10:59 +0200 Subject: [PATCH 4/6] Bumped version to 20200918.1 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 9f9a06db68..a580d6b071 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import setup, find_packages setup( name="home-assistant-frontend", - version="20200918.0", + version="20200918.1", description="The Home Assistant frontend", url="https://github.com/home-assistant/home-assistant-polymer", author="The Home Assistant Authors", From 97156ccf8afe6d5377a34da885fa90e2ecd18c72 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Thu, 24 Sep 2020 20:35:25 +0200 Subject: [PATCH 5/6] Bumped version to 20200918.2 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index a580d6b071..c5e5796d6d 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import setup, find_packages setup( name="home-assistant-frontend", - version="20200918.1", + version="20200918.2", description="The Home Assistant frontend", url="https://github.com/home-assistant/home-assistant-polymer", author="The Home Assistant Authors", From 05164e90fb0ee0620613f8a549a23c3ce649d9e5 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Thu, 24 Sep 2020 19:31:38 +0200 Subject: [PATCH 6/6] Revert lazy loading more info controls (#7123) --- src/dialogs/more-info/ha-more-info-dialog.ts | 50 +++++++++----------- 1 file changed, 23 insertions(+), 27 deletions(-) diff --git a/src/dialogs/more-info/ha-more-info-dialog.ts b/src/dialogs/more-info/ha-more-info-dialog.ts index 4d787863d8..7ff369db55 100644 --- a/src/dialogs/more-info/ha-more-info-dialog.ts +++ b/src/dialogs/more-info/ha-more-info-dialog.ts @@ -35,36 +35,33 @@ import { showConfirmationDialog } from "../generic/show-dialog-box"; import "./ha-more-info-history"; import "./ha-more-info-logbook"; +import "./controls/more-info-alarm_control_panel"; +import "./controls/more-info-automation"; +import "./controls/more-info-camera"; +import "./controls/more-info-climate"; +import "./controls/more-info-configurator"; +import "./controls/more-info-counter"; +import "./controls/more-info-cover"; +import "./controls/more-info-fan"; +import "./controls/more-info-group"; +import "./controls/more-info-humidifier"; +import "./controls/more-info-input_datetime"; +import "./controls/more-info-light"; +import "./controls/more-info-lock"; +import "./controls/more-info-media_player"; +import "./controls/more-info-person"; +import "./controls/more-info-script"; +import "./controls/more-info-sun"; +import "./controls/more-info-timer"; +import "./controls/more-info-vacuum"; +import "./controls/more-info-water_heater"; +import "./controls/more-info-weather"; +import "./controls/more-info-default"; + const DOMAINS_NO_INFO = ["camera", "configurator"]; const EDITABLE_DOMAINS_WITH_ID = ["scene", "automation"]; const EDITABLE_DOMAINS = ["script"]; -const MORE_INFO_CONTROL_IMPORT = { - alarm_control_panel: () => import("./controls/more-info-alarm_control_panel"), - automation: () => import("./controls/more-info-automation"), - camera: () => import("./controls/more-info-camera"), - climate: () => import("./controls/more-info-climate"), - configurator: () => import("./controls/more-info-configurator"), - counter: () => import("./controls/more-info-counter"), - cover: () => import("./controls/more-info-cover"), - fan: () => import("./controls/more-info-fan"), - group: () => import("./controls/more-info-group"), - humidifier: () => import("./controls/more-info-humidifier"), - input_datetime: () => import("./controls/more-info-input_datetime"), - light: () => import("./controls/more-info-light"), - lock: () => import("./controls/more-info-lock"), - media_player: () => import("./controls/more-info-media_player"), - person: () => import("./controls/more-info-person"), - script: () => import("./controls/more-info-script"), - sun: () => import("./controls/more-info-sun"), - timer: () => import("./controls/more-info-timer"), - vacuum: () => import("./controls/more-info-vacuum"), - water_heater: () => import("./controls/more-info-water_heater"), - weather: () => import("./controls/more-info-weather"), - hidden: () => {}, - default: () => import("./controls/more-info-default"), -}; - export interface MoreInfoDialogParams { entityId: string | null; } @@ -108,7 +105,6 @@ export class MoreInfoDialog extends LitElement { } else { const type = stateMoreInfoType(stateObj); this._moreInfoType = `more-info-${type}`; - MORE_INFO_CONTROL_IMPORT[type](); } }