From e0116a8236e7d9589e9da9023ed45ea718ff86c4 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Sat, 7 Dec 2019 20:46:04 +0100 Subject: [PATCH 1/4] Fix thingtalk automations creation (#4328) --- src/panels/config/automation/thingtalk/dialog-thingtalk.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/panels/config/automation/thingtalk/dialog-thingtalk.ts b/src/panels/config/automation/thingtalk/dialog-thingtalk.ts index 09fa45a7f1..9aa87d029d 100644 --- a/src/panels/config/automation/thingtalk/dialog-thingtalk.ts +++ b/src/panels/config/automation/thingtalk/dialog-thingtalk.ts @@ -182,18 +182,19 @@ class DialogThingtalk extends LitElement { if (devices.length === 1) { Object.entries(devices[0]).forEach(([field, value]) => { this._config[type][index][field] = value; - return; }); + return; } const automation = { ...this._config[type][index] }; - delete this._config[type][index]; + const newAutomations: any[] = []; devices.forEach((fields) => { const newAutomation = { ...automation }; Object.entries(fields).forEach(([field, value]) => { newAutomation[field] = value; }); - this._config[type].push(newAutomation); + newAutomations.push(newAutomation); }); + this._config[type].splice(index, 1, ...newAutomations); }); }); this._sendConfig(this._value, this._config); From b283fec48291134ca5c7a569a25eba12f7371c5f Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Mon, 9 Dec 2019 08:34:36 +0100 Subject: [PATCH 2/4] Update cloud-google-assistant.ts (#4329) --- .../config/cloud/google-assistant/cloud-google-assistant.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/panels/config/cloud/google-assistant/cloud-google-assistant.ts b/src/panels/config/cloud/google-assistant/cloud-google-assistant.ts index c7c752a478..819afbc23e 100644 --- a/src/panels/config/cloud/google-assistant/cloud-google-assistant.ts +++ b/src/panels/config/cloud/google-assistant/cloud-google-assistant.ts @@ -335,7 +335,7 @@ class CloudGoogleAssistant extends LitElement { () => { showToast(parent, { message: this.hass!.localize( - "ui.panel.config.cloud.googe.sync_to_google" + "ui.panel.config.cloud.google.sync_to_google" ), }); cloudSyncGoogleAssistant(this.hass); From a29892023b20ffaedcc6def73b27d1142678fffa Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Mon, 9 Dec 2019 12:59:20 +0100 Subject: [PATCH 3/4] Revert "Add copy entity ID/state/attributes menu button in dev tools/states" (#4337) * Revert "Add copy entity ID/state/attributes menu button in dev tools/states (#4259)" This reverts commit 4b56db5255edfacaf1de935f2fe5ae5dcda0ea9d. * Update package.json --- .../state/developer-tools-state.js | 85 ++----------------- src/translations/en.json | 6 +- yarn.lock | 12 --- 3 files changed, 8 insertions(+), 95 deletions(-) diff --git a/src/panels/developer-tools/state/developer-tools-state.js b/src/panels/developer-tools/state/developer-tools-state.js index bfb0511f34..8312f15e34 100644 --- a/src/panels/developer-tools/state/developer-tools-state.js +++ b/src/panels/developer-tools/state/developer-tools-state.js @@ -1,8 +1,6 @@ import "@material/mwc-button"; import "@polymer/paper-checkbox/paper-checkbox"; import "@polymer/paper-input/paper-input"; -import "@polymer/paper-menu-button"; -import copy from "copy-to-clipboard"; import { html } from "@polymer/polymer/lib/utils/html-tag"; import { PolymerElement } from "@polymer/polymer/polymer-element"; @@ -13,7 +11,6 @@ import "../../../components/ha-code-editor"; import "../../../resources/ha-style"; import { EventsMixin } from "../../../mixins/events-mixin"; import LocalizeMixin from "../../../mixins/localize-mixin"; -import { showToast } from "../../../util/toast"; const ERROR_SENTINEL = {}; /* @@ -63,10 +60,6 @@ class HaPanelDevState extends EventsMixin(LocalizeMixin(PolymerElement)) { height: 24px; padding: 0; } - .entities paper-menu-button { - height: 24px; - padding: 0; - } .entities td:nth-child(3) { white-space: pre-wrap; word-break: break-word; @@ -75,9 +68,6 @@ class HaPanelDevState extends EventsMixin(LocalizeMixin(PolymerElement)) { .entities a { color: var(--primary-color); } - paper-icon-item { - cursor: pointer; - }
@@ -160,56 +150,13 @@ class HaPanelDevState extends EventsMixin(LocalizeMixin(PolymerElement)) {