From 7534ecd2f28961a47007605201fb729edac8a7bf Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Tue, 23 Jun 2020 09:38:55 -0700 Subject: [PATCH 1/4] 20200623.1 (#6216) --- setup.py | 2 +- src/components/ha-circular-progress.ts | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index bdc1cc932a..17e217a328 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import setup, find_packages setup( name="home-assistant-frontend", - version="20200623.0", + version="20200623.1", description="The Home Assistant frontend", url="https://github.com/home-assistant/home-assistant-polymer", author="The Home Assistant Authors", diff --git a/src/components/ha-circular-progress.ts b/src/components/ha-circular-progress.ts index c15ce80fd4..e219f52e47 100644 --- a/src/components/ha-circular-progress.ts +++ b/src/components/ha-circular-progress.ts @@ -7,6 +7,7 @@ import { customElement, unsafeCSS, SVGTemplateResult, + css, } from "lit-element"; // @ts-ignore import progressStyles from "@material/circular-progress/dist/mdc.circular-progress.min.css"; @@ -74,7 +75,14 @@ export class HaCircularProgress extends LitElement { } static get styles() { - return unsafeCSS(progressStyles); + return [ + unsafeCSS(progressStyles), + css` + :host { + text-align: initial; + } + `, + ]; } } From a8a8cafd2bcaaad8dfa9be2e62390279f42cd666 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Mon, 6 Jul 2020 03:57:15 -0700 Subject: [PATCH 2/4] Fix logbook showing user names (#6327) Co-authored-by: Bram Kragten --- src/panels/logbook/ha-panel-logbook.ts | 42 +++++++++++++++++++++----- 1 file changed, 34 insertions(+), 8 deletions(-) diff --git a/src/panels/logbook/ha-panel-logbook.ts b/src/panels/logbook/ha-panel-logbook.ts index 62eebaad51..8a0cf68b1f 100644 --- a/src/panels/logbook/ha-panel-logbook.ts +++ b/src/panels/logbook/ha-panel-logbook.ts @@ -18,6 +18,7 @@ import { import { HomeAssistant } from "../../types"; import { haStyle } from "../../resources/styles"; import { fetchUsers } from "../../data/user"; +import { fetchPersons } from "../../data/person"; import { clearLogbookCache, getLogbookData, @@ -132,7 +133,7 @@ export class HaPanelLogbook extends LitElement { super.firstUpdated(changedProps); this.hass.loadBackendTranslation("title"); - this._fetchUserDone = this._fetchUsers(); + this._fetchUserDone = this._fetchUserNames(); const today = new Date(); today.setHours(0, 0, 0, 0); @@ -197,13 +198,38 @@ export class HaPanelLogbook extends LitElement { } } - private async _fetchUsers() { - const users = await fetchUsers(this.hass); - const userid_to_name = {}; - users.forEach((user) => { - userid_to_name[user.id] = user.name; - }); - this._userIdToName = userid_to_name; + private async _fetchUserNames() { + const userIdToName = {}; + + // Start loading all the data + const personProm = fetchPersons(this.hass); + const userProm = this.hass.user!.is_admin && fetchUsers(this.hass); + + // Process persons + const persons = await personProm; + + for (const person of persons.storage) { + if (person.user_id) { + userIdToName[person.user_id] = person.name; + } + } + for (const person of persons.config) { + if (person.user_id) { + userIdToName[person.user_id] = person.name; + } + } + + // Process users + if (userProm) { + const users = await userProm; + for (const user of users) { + if (!(user.id in userIdToName)) { + userIdToName[user.id] = user.name; + } + } + } + + this._userIdToName = userIdToName; } private _dateRangeChanged(ev) { From a8e8c1ce5d00d07698f3c94bdf6458a85c858393 Mon Sep 17 00:00:00 2001 From: Christopher Masto Date: Mon, 6 Jul 2020 03:39:54 -0400 Subject: [PATCH 3/4] Fix missing UI elements in Z-Wave panel (#6299) (#6336) This broke in d94df728e55bdf947791e1a73d9d6fbfd41e4d2e and prevents use of the group association and protection controls. --- .../integrations/integration-panels/zwave/zwave-groups.js | 3 ++- .../integration-panels/zwave/zwave-node-protection.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/panels/config/integrations/integration-panels/zwave/zwave-groups.js b/src/panels/config/integrations/integration-panels/zwave/zwave-groups.js index 102567a289..94037f1e03 100644 --- a/src/panels/config/integrations/integration-panels/zwave/zwave-groups.js +++ b/src/panels/config/integrations/integration-panels/zwave/zwave-groups.js @@ -7,9 +7,10 @@ import { PolymerElement } from "@polymer/polymer/polymer-element"; import { computeStateName } from "../../../../../common/entity/compute_state_name"; import "../../../../../components/buttons/ha-call-service-button"; import "../../../../../components/ha-card"; +import LocalizeMixin from "../../../../../mixins/localize-mixin"; import "../../../../../styles/polymer-ha-style"; -class ZwaveGroups extends PolymerElement { +class ZwaveGroups extends LocalizeMixin(PolymerElement) { static get template() { return html`