From ac911dcd31dc3abb05947f92036cede390efd7bd Mon Sep 17 00:00:00 2001 From: Zack Arnett Date: Wed, 18 Mar 2020 07:47:20 -0400 Subject: [PATCH 01/66] Fix theme update (#5246) --- src/panels/lovelace/cards/hui-thermostat-card.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/panels/lovelace/cards/hui-thermostat-card.ts b/src/panels/lovelace/cards/hui-thermostat-card.ts index 0570af89b2..24985d52b5 100644 --- a/src/panels/lovelace/cards/hui-thermostat-card.ts +++ b/src/panels/lovelace/cards/hui-thermostat-card.ts @@ -271,7 +271,12 @@ export class HuiThermostatCard extends LitElement implements LovelaceCard { protected updated(changedProps: PropertyValues): void { super.updated(changedProps); - if (!this._config || !this.hass || !changedProps.has("hass")) { + + if ( + !this._config || + !this.hass || + (!changedProps.has("hass") && !changedProps.has("_config")) + ) { return; } From 1d3aeec0deafafc66769c58b545209182ec13cf5 Mon Sep 17 00:00:00 2001 From: Zack Arnett Date: Wed, 18 Mar 2020 07:47:59 -0400 Subject: [PATCH 02/66] more info (#5247) --- src/panels/lovelace/cards/hui-alarm-panel-card.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/panels/lovelace/cards/hui-alarm-panel-card.ts b/src/panels/lovelace/cards/hui-alarm-panel-card.ts index 5c171ddb6b..6f7955d685 100644 --- a/src/panels/lovelace/cards/hui-alarm-panel-card.ts +++ b/src/panels/lovelace/cards/hui-alarm-panel-card.ts @@ -26,6 +26,7 @@ import { PaperInputElement } from "@polymer/paper-input/paper-input"; import { applyThemesOnElement } from "../../../common/dom/apply_themes_on_element"; import { findEntities } from "../common/find-entites"; import { LovelaceConfig } from "../../../data/lovelace"; +import { fireEvent } from "../../../common/dom/fire_event"; const ICONS = { armed_away: "hass:shield-lock", @@ -173,6 +174,7 @@ class HuiAlarmPanelCard extends LitElement implements LovelaceCard { class="${classMap({ [stateObj.state]: true })}" .icon="${ICONS[stateObj.state] || "hass:shield-outline"}" .label="${this._stateIconLabel(stateObj.state)}" + @click=${this._handleMoreInfo} >
${(stateObj.state === "disarmed" @@ -260,6 +262,12 @@ class HuiAlarmPanelCard extends LitElement implements LovelaceCard { input.value = ""; } + private _handleMoreInfo() { + fireEvent(this, "hass-more-info", { + entityId: this._config!.entity, + }); + } + static get styles(): CSSResult { return css` ha-card { @@ -281,6 +289,7 @@ class HuiAlarmPanelCard extends LitElement implements LovelaceCard { position: absolute; right: 12px; top: 12px; + cursor: pointer; } .disarmed { From 205b7451fa5ac8930d66e94abe19af1fd21959a7 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Wed, 18 Mar 2020 12:48:16 +0100 Subject: [PATCH 03/66] Update hui-gauge-card.ts (#5241) --- src/panels/lovelace/cards/hui-gauge-card.ts | 45 +++++++++------------ 1 file changed, 18 insertions(+), 27 deletions(-) diff --git a/src/panels/lovelace/cards/hui-gauge-card.ts b/src/panels/lovelace/cards/hui-gauge-card.ts index a7e9faae09..ad79b717a5 100644 --- a/src/panels/lovelace/cards/hui-gauge-card.ts +++ b/src/panels/lovelace/cards/hui-gauge-card.ts @@ -136,7 +136,6 @@ class HuiGaugeCard extends LitElement implements LovelaceCard { >
-
-
-
- ${stateObj.state} - ${this._config.unit || - stateObj.attributes.unit_of_measurement || - ""} -
-
- ${this._config.name || computeStateName(stateObj)} -
+
+
+
+
+ ${stateObj.state} + ${this._config.unit || + stateObj.attributes.unit_of_measurement || + ""} +
+
+ ${this._config.name || computeStateName(stateObj)}
@@ -250,9 +250,8 @@ class HuiGaugeCard extends LitElement implements LovelaceCard { static get styles(): CSSResult { return css` ha-card { - height: calc(var(--base-unit) * 3); - position: relative; cursor: pointer; + padding: 16px 16px 0 16px; } ha-card:focus { outline: none; @@ -261,15 +260,12 @@ class HuiGaugeCard extends LitElement implements LovelaceCard { .container { width: calc(var(--base-unit) * 4); height: calc(var(--base-unit) * 2); - position: absolute; - top: calc(var(--base-unit) * 1.5); - left: 50%; overflow: hidden; + position: relative; text-align: center; - transform: translate(-50%, -50%); + margin: auto; } .gauge-a { - z-index: 1; position: absolute; background-color: var(--primary-background-color); width: calc(var(--base-unit) * 4); @@ -279,7 +275,6 @@ class HuiGaugeCard extends LitElement implements LovelaceCard { 0px 0px; } .gauge-b { - z-index: 3; position: absolute; background-color: var(--paper-card-background-color); width: calc(var(--base-unit) * 2.5); @@ -291,7 +286,6 @@ class HuiGaugeCard extends LitElement implements LovelaceCard { 0px 0px; } .gauge-c { - z-index: 2; position: absolute; background-color: var(--label-badge-blue); width: calc(var(--base-unit) * 4); @@ -307,15 +301,12 @@ class HuiGaugeCard extends LitElement implements LovelaceCard { transition: all 1.3s ease-in-out; } .gauge-data { - z-index: 4; + text-align: center; color: var(--primary-text-color); line-height: calc(var(--base-unit) * 0.3); - position: absolute; - width: calc(var(--base-unit) * 4); - height: var(--base-unit); - top: var(--base-unit); - margin-left: auto; - margin-right: auto; + width: 100%; + position: relative; + top: calc(var(--base-unit) * -0.5); } .init .gauge-data { transition: all 1s ease-out; From 6b2e707653e52e9a86cc0c03b70d58de830099ee Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Wed, 18 Mar 2020 12:49:32 +0100 Subject: [PATCH 04/66] Update en.json --- src/translations/en.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/translations/en.json b/src/translations/en.json index 1e85c72144..c1c628a10d 100755 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -887,7 +887,7 @@ "title": "Title", "title_required": "Title is required.", "url": "Url", - "url_error_msg": "The url should contain a - and cannot contain spaces or special characters, except for _ and -", + "url_error_msg": "The URL should contain a - and cannot contain spaces or special characters, except for _ and -", "require_admin": "Admin only", "delete": "Delete", "update": "Update", From a8d21c6112299d49e82b81b76ab7dcff77e4dbfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliv=C3=A9r=20Falvai?= Date: Wed, 18 Mar 2020 17:00:08 +0100 Subject: [PATCH 05/66] Add loading text for long-running integration install step (#4378) * Added optional label for dialog-data-entry-flow * Use correct loading element * Update src/translations/en.json Co-Authored-By: Bram Kragten * Minor template adjustment * Revert accidental change of PR templates * Revert accidental change of PR templates Co-authored-by: Bram Kragten --- src/dialogs/config-flow/dialog-data-entry-flow.ts | 6 +++++- src/dialogs/config-flow/step-flow-loading.ts | 8 ++++++++ src/translations/en.json | 3 ++- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/dialogs/config-flow/dialog-data-entry-flow.ts b/src/dialogs/config-flow/dialog-data-entry-flow.ts index 2ff2a75f55..1f79a1bfc1 100644 --- a/src/dialogs/config-flow/dialog-data-entry-flow.ts +++ b/src/dialogs/config-flow/dialog-data-entry-flow.ts @@ -130,7 +130,11 @@ class DataEntryFlowDialog extends LitElement { > ${this._loading || (this._step === null && this._handlers === undefined) ? html` - + ` : this._step === undefined ? // When we are going to next step, we render 1 round of empty diff --git a/src/dialogs/config-flow/step-flow-loading.ts b/src/dialogs/config-flow/step-flow-loading.ts index 6df00345ca..ce6ffd2f13 100644 --- a/src/dialogs/config-flow/step-flow-loading.ts +++ b/src/dialogs/config-flow/step-flow-loading.ts @@ -5,14 +5,22 @@ import { css, customElement, CSSResult, + property, } from "lit-element"; import "@polymer/paper-spinner/paper-spinner-lite"; @customElement("step-flow-loading") class StepFlowLoading extends LitElement { + @property() public label?: string; + protected render(): TemplateResult { return html`
+ ${this.label + ? html` +
${this.label}
+ ` + : ""}
`; diff --git a/src/translations/en.json b/src/translations/en.json index c1c628a10d..5b770289d5 100755 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -1638,7 +1638,8 @@ "external_step": { "description": "This step requires you to visit an external website to be completed.", "open_site": "Open website" - } + }, + "loading_first_time": "Please wait while the integration is being installed" } }, "users": { From 16cadd53cfe55fb99a7b0bdf88538b37e70b0185 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Wed, 18 Mar 2020 12:27:44 -0700 Subject: [PATCH 06/66] Set data as property. (#5263) --- src/panels/lovelace/hui-root.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/panels/lovelace/hui-root.ts b/src/panels/lovelace/hui-root.ts index 72a2036879..134adb4cdf 100644 --- a/src/panels/lovelace/hui-root.ts +++ b/src/panels/lovelace/hui-root.ts @@ -84,13 +84,13 @@ class HUIRoot extends LitElement { protected render(): TemplateResult { return html` - + } @data-changed=${this._routeDataChanged}> - + })} fixed condenses> ${ this._editMode ? html` From 2741bb8b38c172e06dec60eb10774647423a0b7a Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Wed, 18 Mar 2020 12:32:35 -0700 Subject: [PATCH 07/66] Fix calculating title if panels not loaded yet (#5262) --- src/common/const.ts | 3 --- src/components/ha-sidebar.ts | 10 ++++----- src/data/panel.ts | 38 ++++++++++++++++++++++------------ src/layouts/home-assistant.ts | 4 ++-- src/state/panel-title-mixin.ts | 27 ++++++++++++------------ 5 files changed, 45 insertions(+), 37 deletions(-) diff --git a/src/common/const.ts b/src/common/const.ts index a2dc5412f7..a17ecd29da 100644 --- a/src/common/const.ts +++ b/src/common/const.ts @@ -7,9 +7,6 @@ /** Icon to use when no icon specified for domain. */ export const DEFAULT_DOMAIN_ICON = "hass:bookmark"; -/** Panel to show when no panel is picked. */ -export const DEFAULT_PANEL = "lovelace"; - /** Domains that have a state card. */ export const DOMAINS_WITH_CARD = [ "climate", diff --git a/src/components/ha-sidebar.ts b/src/components/ha-sidebar.ts index 9e0eca09fe..321a703bda 100644 --- a/src/components/ha-sidebar.ts +++ b/src/components/ha-sidebar.ts @@ -18,7 +18,6 @@ import "../components/user/ha-user-badge"; import "../components/ha-menu-button"; import { HomeAssistant, PanelInfo } from "../types"; import { fireEvent } from "../common/dom/fire_event"; -import { DEFAULT_PANEL } from "../common/const"; import { getExternalConfig, ExternalConfig, @@ -33,6 +32,7 @@ import { classMap } from "lit-html/directives/class-map"; import { PaperIconItemElement } from "@polymer/paper-item/paper-icon-item"; import { computeRTL } from "../common/util/compute_rtl"; import { compare } from "../common/string/compare"; +import { getDefaultPanelUrlPath, getDefaultPanel } from "../data/panel"; const SHOW_AFTER_SPACER = ["config", "developer-tools", "hassio"]; @@ -77,7 +77,6 @@ const panelSorter = (a: PanelInfo, b: PanelInfo) => { // both not built in, sort by title return compare(a.title!, b.title!); }; -const DEFAULT_PAGE = localStorage.defaultPage || DEFAULT_PANEL; const computePanels = (hass: HomeAssistant): [PanelInfo[], PanelInfo[]] => { const panels = hass.panels; @@ -88,8 +87,10 @@ const computePanels = (hass: HomeAssistant): [PanelInfo[], PanelInfo[]] => { const beforeSpacer: PanelInfo[] = []; const afterSpacer: PanelInfo[] = []; + const defaultPage = getDefaultPanelUrlPath(); + Object.values(panels).forEach((panel) => { - if (!panel.title || panel.url_path === DEFAULT_PAGE) { + if (!panel.title || panel.url_path === defaultPage) { return; } (SHOW_AFTER_SPACER.includes(panel.url_path) @@ -142,8 +143,7 @@ class HaSidebar extends LitElement { } } - const defaultPanel = - this.hass.panels[DEFAULT_PAGE] || this.hass.panels[DEFAULT_PANEL]; + const defaultPanel = getDefaultPanel(hass.panels); return html` ${ diff --git a/src/translations/en.json b/src/translations/en.json index 6528af6d3a..5d0c6b5443 100755 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -652,9 +652,9 @@ "enabled_label": "Enable entity", "enabled_cause": "Disabled by {cause}.", "enabled_description": "Disabled entities will not be added to Home Assistant.", - "delete": "DELETE", + "delete": "Delete", "confirm_delete": "Are you sure you want to delete this entry?", - "update": "UPDATE", + "update": "Update", "note": "Note: this might not work yet with all integrations." } }, @@ -789,13 +789,13 @@ "introduction2": "To place devices in an area, use the link below to navigate to the integrations page and then click on a configured integration to get to the device cards.", "integrations_page": "Integrations page", "no_areas": "Looks like you have no areas yet!", - "create_area": "CREATE AREA" + "create_area": "Create Area" }, "editor": { "default_name": "New Area", - "delete": "DELETE", - "update": "UPDATE", - "create": "CREATE" + "delete": "Delete", + "update": "Update", + "create": "Create" }, "delete": { "confirmation_title": "Are you sure you want to delete this area?", @@ -1483,7 +1483,9 @@ "integration": "Integration", "battery": "Battery", "no_devices": "No devices" - } + }, + "delete": "Delete", + "confirm_delete": "Are you sure you want to delete this device?" }, "entities": { "caption": "Entities", From 15a144f17a8696533dc666e7a3c1fe0fb92f473d Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Fri, 20 Mar 2020 17:53:30 +0100 Subject: [PATCH 24/66] Add iframe panel mode and align aspect ratio option with map card (#5289) * Add iframe panel mode and align aspect ratio option with map card * lint --- src/panels/lovelace/cards/hui-iframe-card.ts | 25 ++++++++++++++++--- src/panels/lovelace/cards/hui-map-card.ts | 7 ------ .../config-elements/hui-iframe-card-editor.ts | 13 +++------- 3 files changed, 26 insertions(+), 19 deletions(-) diff --git a/src/panels/lovelace/cards/hui-iframe-card.ts b/src/panels/lovelace/cards/hui-iframe-card.ts index 7e804f0842..65882e0774 100644 --- a/src/panels/lovelace/cards/hui-iframe-card.ts +++ b/src/panels/lovelace/cards/hui-iframe-card.ts @@ -13,6 +13,7 @@ import "../../../components/ha-card"; import { LovelaceCard, LovelaceCardEditor } from "../types"; import { styleMap } from "lit-html/directives/style-map"; import { IframeCardConfig } from "./types"; +import parseAspectRatio from "../../../common/util/parse-aspect-ratio"; @customElement("hui-iframe-card") export class HuiIframeCard extends LitElement implements LovelaceCard { @@ -29,7 +30,8 @@ export class HuiIframeCard extends LitElement implements LovelaceCard { aspect_ratio: "50%", }; } - + @property({ type: Boolean, reflect: true }) + public isPanel = false; @property() protected _config?: IframeCardConfig; public getCardSize(): number { @@ -55,14 +57,22 @@ export class HuiIframeCard extends LitElement implements LovelaceCard { return html``; } - const aspectRatio = this._config.aspect_ratio || "50%"; + let padding = ""; + if (!this.isPanel && this._config.aspect_ratio) { + const ratio = parseAspectRatio(this._config.aspect_ratio); + if (ratio && ratio.w > 0 && ratio.h > 0) { + padding = `${((100 * ratio.h) / ratio.w).toFixed(2)}%`; + } + } else if (!this.isPanel) { + padding = "50%"; + } return html`
@@ -73,6 +83,11 @@ export class HuiIframeCard extends LitElement implements LovelaceCard { static get styles(): CSSResult { return css` + :host([ispanel]) ha-card { + width: 100%; + height: 100%; + } + ha-card { overflow: hidden; } @@ -82,6 +97,10 @@ export class HuiIframeCard extends LitElement implements LovelaceCard { position: relative; } + :host([ispanel]) #root { + height: 100%; + } + iframe { position: absolute; border: none; diff --git a/src/panels/lovelace/cards/hui-map-card.ts b/src/panels/lovelace/cards/hui-map-card.ts index ad1269d974..d59be48059 100644 --- a/src/panels/lovelace/cards/hui-map-card.ts +++ b/src/panels/lovelace/cards/hui-map-card.ts @@ -456,15 +456,8 @@ class HuiMapCard extends LitElement implements LovelaceCard { static get styles(): CSSResult { return css` :host([ispanel]) ha-card { - left: 0; - top: 0; width: 100%; - /** - * In panel mode we want a full height map. Since parent #view - * only sets min-height, we need absolute positioning here - */ height: 100%; - position: absolute; } ha-card { diff --git a/src/panels/lovelace/editor/config-elements/hui-iframe-card-editor.ts b/src/panels/lovelace/editor/config-elements/hui-iframe-card-editor.ts index 913e1705a5..dab2a372de 100644 --- a/src/panels/lovelace/editor/config-elements/hui-iframe-card-editor.ts +++ b/src/panels/lovelace/editor/config-elements/hui-iframe-card-editor.ts @@ -81,11 +81,10 @@ export class HuiIframeCardEditor extends LitElement )} (${this.hass.localize( "ui.panel.lovelace.editor.card.config.optional" )})" - .value="${this._aspect_ratio.replace("%", "")}" + .value="${this._aspect_ratio}" .configValue="${"aspect_ratio"}" @value-changed="${this._valueChanged}" - >
%
+ >
`; @@ -96,17 +95,13 @@ export class HuiIframeCardEditor extends LitElement return; } const target = ev.target! as EditorTarget; - let value = target.value; - - if (target.configValue! === "aspect_ratio" && target.value) { - value += "%"; - } + const value = target.value; if (this[`_${target.configValue}`] === value) { return; } if (target.configValue) { - if (target.value === "") { + if (value === "") { delete this._config[target.configValue!]; } else { this._config = { ...this._config, [target.configValue!]: value }; From 7d6f188bfc7bb89976b38439b8a50588e70d6fff Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Fri, 20 Mar 2020 21:30:20 +0100 Subject: [PATCH 25/66] Change themes logic (#5232) * Fix themes * Update hui-view.ts * Comments and bail out * Update apply_themes_on_element.ts * refactor, move meta to theme mixin, adapt lovelace theme picker * console.bye * Comments * Optimizations * Bail out early is no hex value * Cache processed themes * Remove hex-rgb cache --- hassio/src/hassio-main.ts | 3 +- src/common/dom/apply_themes_on_element.ts | 119 ++++++++++-------- src/fake_data/provide_hass.ts | 3 +- .../components/hui-theme-select-editor.ts | 55 ++++---- .../hui-alarm-panel-card-editor.ts | 2 +- .../config-elements/hui-button-card-editor.ts | 2 +- .../hui-entities-card-editor.ts | 2 +- .../config-elements/hui-gauge-card-editor.ts | 2 +- .../config-elements/hui-glance-card-editor.ts | 2 +- .../config-elements/hui-light-card-editor.ts | 2 +- .../hui-markdown-card-editor.ts | 2 +- .../hui-picture-card-editor.ts | 2 +- .../hui-picture-entity-card-editor.ts | 2 +- .../hui-picture-glance-card-editor.ts | 2 +- .../hui-plant-status-card-editor.ts | 2 +- .../config-elements/hui-sensor-card-editor.ts | 2 +- .../hui-shopping-list-editor.ts | 2 +- .../hui-thermostat-card-editor.ts | 2 +- .../hui-weather-forecast-card-editor.ts | 2 +- .../editor/view-editor/hui-view-editor.ts | 2 +- src/state/themes-mixin.ts | 23 +++- src/translations/en.json | 1 + 22 files changed, 132 insertions(+), 104 deletions(-) diff --git a/hassio/src/hassio-main.ts b/hassio/src/hassio-main.ts index 1b6ac36288..ff5def6b41 100644 --- a/hassio/src/hassio-main.ts +++ b/hassio/src/hassio-main.ts @@ -87,8 +87,7 @@ class HassioMain extends ProvideHassLitMixin(HassRouterPage) { applyThemesOnElement( this.parentElement, this.hass.themes, - this.hass.selectedTheme, - true + this.hass.selectedTheme || this.hass.themes.default_theme ); this.addEventListener("hass-api-called", (ev) => this._apiCalled(ev)); // Paulus - March 17, 2019 diff --git a/src/common/dom/apply_themes_on_element.ts b/src/common/dom/apply_themes_on_element.ts index 12cd3757cf..b8a275b35d 100644 --- a/src/common/dom/apply_themes_on_element.ts +++ b/src/common/dom/apply_themes_on_element.ts @@ -1,4 +1,10 @@ import { derivedStyles } from "../../resources/styles"; +import { HomeAssistant, Theme } from "../../types"; + +interface ProcessedTheme { + keys: { [key: string]: "" }; + styles: { [key: string]: string }; +} const hexToRgb = (hex: string): string | null => { const shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i; @@ -15,67 +21,82 @@ const hexToRgb = (hex: string): string | null => { : null; }; +let PROCESSED_THEMES: { [key: string]: ProcessedTheme } = {}; + /** * Apply a theme to an element by setting the CSS variables on it. * * element: Element to apply theme on. * themes: HASS Theme information - * localTheme: selected theme. - * updateMeta: boolean if we should update the theme-color meta element. + * selectedTheme: selected theme. */ export const applyThemesOnElement = ( element, - themes, - localTheme, - updateMeta = false + themes: HomeAssistant["themes"], + selectedTheme?: string ) => { - if (!element._themes) { - element._themes = {}; - } - let themeName = themes.default_theme; - if (localTheme === "default" || (localTheme && themes.themes[localTheme])) { - themeName = localTheme; - } - const styles = { ...element._themes }; - if (themeName !== "default") { - const theme = { ...derivedStyles, ...themes.themes[themeName] }; - Object.keys(theme).forEach((key) => { - const prefixedKey = `--${key}`; - element._themes[prefixedKey] = ""; - styles[prefixedKey] = theme[key]; - if (key.startsWith("rgb")) { - return; - } - const rgbKey = `rgb-${key}`; - if (theme[rgbKey] !== undefined) { - return; - } - const prefixedRgbKey = `--${rgbKey}`; - element._themes[prefixedRgbKey] = ""; - const rgbValue = hexToRgb(theme[key]); - if (rgbValue !== null) { - styles[prefixedRgbKey] = rgbValue; - } - }); - } - if (element.updateStyles) { - element.updateStyles(styles); - } else if (window.ShadyCSS) { - // implement updateStyles() method of Polymer elements - window.ShadyCSS.styleSubtree(/** @type {!HTMLElement} */ element, styles); - } + const newTheme = selectedTheme + ? PROCESSED_THEMES[selectedTheme] || processTheme(selectedTheme, themes) + : undefined; - if (!updateMeta) { + if (!element._themes && !newTheme) { + // No styles to reset, and no styles to set return; } - const meta = document.querySelector("meta[name=theme-color]"); - if (meta) { - if (!meta.hasAttribute("default-content")) { - meta.setAttribute("default-content", meta.getAttribute("content")!); - } - const themeColor = - styles["--primary-color"] || meta.getAttribute("default-content"); - meta.setAttribute("content", themeColor); + // Add previous set keys to reset them, and new theme + const styles = { ...element._themes, ...newTheme?.styles }; + element._themes = newTheme?.keys; + + // Set and/or reset styles + if (element.updateStyles) { + element.updateStyles(styles); + } else if (window.ShadyCSS) { + // Implement updateStyles() method of Polymer elements + window.ShadyCSS.styleSubtree(/** @type {!HTMLElement} */ element, styles); } }; + +const processTheme = ( + themeName: string, + themes: HomeAssistant["themes"] +): ProcessedTheme | undefined => { + if (!themes.themes[themeName]) { + return; + } + const theme: Theme = { + ...derivedStyles, + ...themes.themes[themeName], + }; + const styles = {}; + const keys = {}; + for (const key of Object.keys(theme)) { + const prefixedKey = `--${key}`; + const value = theme[key]; + styles[prefixedKey] = value; + keys[prefixedKey] = ""; + + // Try to create a rgb value for this key if it is a hex color + if (!value.startsWith("#")) { + // Not a hex color + continue; + } + const rgbKey = `rgb-${key}`; + if (theme[rgbKey] !== undefined) { + // Theme has it's own rgb value + continue; + } + const rgbValue = hexToRgb(value); + if (rgbValue !== null) { + const prefixedRgbKey = `--${rgbKey}`; + styles[prefixedRgbKey] = rgbValue; + keys[prefixedRgbKey] = ""; + } + } + PROCESSED_THEMES[themeName] = { styles, keys }; + return { styles, keys }; +}; + +export const invalidateThemeCache = () => { + PROCESSED_THEMES = {}; +}; diff --git a/src/fake_data/provide_hass.ts b/src/fake_data/provide_hass.ts index 822b1c6aae..032541f0fe 100644 --- a/src/fake_data/provide_hass.ts +++ b/src/fake_data/provide_hass.ts @@ -237,8 +237,7 @@ export const provideHass = ( applyThemesOnElement( document.documentElement, themes, - selectedTheme, - true + selectedTheme as string ); }, diff --git a/src/panels/lovelace/components/hui-theme-select-editor.ts b/src/panels/lovelace/components/hui-theme-select-editor.ts index 5902ca5310..9d206be7f5 100644 --- a/src/panels/lovelace/components/hui-theme-select-editor.ts +++ b/src/panels/lovelace/components/hui-theme-select-editor.ts @@ -10,18 +10,7 @@ import { import "@material/mwc-button"; import { HomeAssistant } from "../../../types"; -import { fireEvent, HASSDomEvent } from "../../../common/dom/fire_event"; - -declare global { - // for fire event - interface HASSDomEvents { - "theme-changed": undefined; - } - // for add event listener - interface HTMLElementEventMap { - "theme-changed": HASSDomEvent; - } -} +import { fireEvent } from "../../../common/dom/fire_event"; @customElement("hui-theme-select-editor") export class HuiThemeSelectEditor extends LitElement { @@ -30,32 +19,34 @@ export class HuiThemeSelectEditor extends LitElement { @property() public hass?: HomeAssistant; protected render(): TemplateResult { - const themes = ["Backend-selected", "default"].concat( - Object.keys(this.hass!.themes.themes).sort() - ); - return html` - ${themes.map((theme) => { - return html` - ${theme} - `; - })} + ${this.hass!.localize( + "ui.panel.lovelace.editor.card.generic.no_theme" + )} + ${Object.keys(this.hass!.themes.themes) + .sort() + .map((theme) => { + return html` + ${theme} + `; + })} `; @@ -70,11 +61,11 @@ export class HuiThemeSelectEditor extends LitElement { } private _changed(ev): void { - if (!this.hass || ev.target.value === "") { + if (!this.hass || ev.target.selected === "") { return; } - this.value = ev.target.value; - fireEvent(this, "theme-changed"); + this.value = ev.target.selected === "remove" ? "" : ev.target.selected; + fireEvent(this, "value-changed", { value: this.value }); } } diff --git a/src/panels/lovelace/editor/config-elements/hui-alarm-panel-card-editor.ts b/src/panels/lovelace/editor/config-elements/hui-alarm-panel-card-editor.ts index e6bbf53ab6..b1e1a1f342 100644 --- a/src/panels/lovelace/editor/config-elements/hui-alarm-panel-card-editor.ts +++ b/src/panels/lovelace/editor/config-elements/hui-alarm-panel-card-editor.ts @@ -123,7 +123,7 @@ export class HuiAlarmPanelCardEditor extends LitElement .hass=${this.hass} .value="${this._theme}" .configValue="${"theme"}" - @theme-changed="${this._valueChanged}" + @value-changed="${this._valueChanged}" >
`; diff --git a/src/panels/lovelace/editor/config-elements/hui-button-card-editor.ts b/src/panels/lovelace/editor/config-elements/hui-button-card-editor.ts index ac9e25c3aa..f8f292bb0e 100644 --- a/src/panels/lovelace/editor/config-elements/hui-button-card-editor.ts +++ b/src/panels/lovelace/editor/config-elements/hui-button-card-editor.ts @@ -173,7 +173,7 @@ export class HuiButtonCardEditor extends LitElement .hass=${this.hass} .value="${this._theme}" .configValue="${"theme"}" - @theme-changed="${this._valueChanged}" + @value-changed="${this._valueChanged}" > diff --git a/src/panels/lovelace/editor/config-elements/hui-entities-card-editor.ts b/src/panels/lovelace/editor/config-elements/hui-entities-card-editor.ts index d1b5dbe258..0fd383e2ba 100644 --- a/src/panels/lovelace/editor/config-elements/hui-entities-card-editor.ts +++ b/src/panels/lovelace/editor/config-elements/hui-entities-card-editor.ts @@ -88,7 +88,7 @@ export class HuiEntitiesCardEditor extends LitElement .hass=${this.hass} .value="${this._theme}" .configValue="${"theme"}" - @theme-changed="${this._valueChanged}" + @value-changed="${this._valueChanged}" > `; diff --git a/src/panels/lovelace/editor/config-elements/hui-markdown-card-editor.ts b/src/panels/lovelace/editor/config-elements/hui-markdown-card-editor.ts index 6bfd0c2f0a..f5b56e201c 100644 --- a/src/panels/lovelace/editor/config-elements/hui-markdown-card-editor.ts +++ b/src/panels/lovelace/editor/config-elements/hui-markdown-card-editor.ts @@ -84,7 +84,7 @@ export class HuiMarkdownCardEditor extends LitElement .hass=${this.hass} .value="${this._theme}" .configValue="${"theme"}" - @theme-changed="${this._valueChanged}" + @value-changed="${this._valueChanged}" > `; diff --git a/src/panels/lovelace/editor/config-elements/hui-picture-card-editor.ts b/src/panels/lovelace/editor/config-elements/hui-picture-card-editor.ts index 5dddb93018..6b86440d07 100644 --- a/src/panels/lovelace/editor/config-elements/hui-picture-card-editor.ts +++ b/src/panels/lovelace/editor/config-elements/hui-picture-card-editor.ts @@ -108,7 +108,7 @@ export class HuiPictureCardEditor extends LitElement .hass=${this.hass} .value="${this._theme}" .configValue="${"theme"}" - @theme-changed="${this._valueChanged}" + @value-changed="${this._valueChanged}" > diff --git a/src/panels/lovelace/editor/config-elements/hui-picture-entity-card-editor.ts b/src/panels/lovelace/editor/config-elements/hui-picture-entity-card-editor.ts index 2dd7b7aebd..e81e2b114d 100644 --- a/src/panels/lovelace/editor/config-elements/hui-picture-entity-card-editor.ts +++ b/src/panels/lovelace/editor/config-elements/hui-picture-entity-card-editor.ts @@ -235,7 +235,7 @@ export class HuiPictureEntityCardEditor extends LitElement .hass=${this.hass} .value="${this._theme}" .configValue="${"theme"}" - @theme-changed="${this._valueChanged}" + @value-changed="${this._valueChanged}" > diff --git a/src/panels/lovelace/editor/config-elements/hui-picture-glance-card-editor.ts b/src/panels/lovelace/editor/config-elements/hui-picture-glance-card-editor.ts index d8d2aa690e..d9d1c2c48a 100644 --- a/src/panels/lovelace/editor/config-elements/hui-picture-glance-card-editor.ts +++ b/src/panels/lovelace/editor/config-elements/hui-picture-glance-card-editor.ts @@ -234,7 +234,7 @@ export class HuiPictureGlanceCardEditor extends LitElement .hass=${this.hass} .value="${this._theme}" .configValue="${"theme"}" - @theme-changed="${this._valueChanged}" + @value-changed="${this._valueChanged}" > `; diff --git a/src/panels/lovelace/editor/config-elements/hui-plant-status-card-editor.ts b/src/panels/lovelace/editor/config-elements/hui-plant-status-card-editor.ts index fe2d93356c..ef84475b34 100644 --- a/src/panels/lovelace/editor/config-elements/hui-plant-status-card-editor.ts +++ b/src/panels/lovelace/editor/config-elements/hui-plant-status-card-editor.ts @@ -85,7 +85,7 @@ export class HuiPlantStatusCardEditor extends LitElement .hass=${this.hass} .value="${this._theme}" .configValue="${"theme"}" - @theme-changed="${this._valueChanged}" + @value-changed="${this._valueChanged}" > `; diff --git a/src/panels/lovelace/editor/config-elements/hui-sensor-card-editor.ts b/src/panels/lovelace/editor/config-elements/hui-sensor-card-editor.ts index 9114bc19d0..cf861ca1ae 100644 --- a/src/panels/lovelace/editor/config-elements/hui-sensor-card-editor.ts +++ b/src/panels/lovelace/editor/config-elements/hui-sensor-card-editor.ts @@ -170,7 +170,7 @@ export class HuiSensorCardEditor extends LitElement .hass=${this.hass} .value="${this._theme}" .configValue="${"theme"}" - @theme-changed="${this._valueChanged}" + @value-changed="${this._valueChanged}" > `; diff --git a/src/panels/lovelace/editor/config-elements/hui-thermostat-card-editor.ts b/src/panels/lovelace/editor/config-elements/hui-thermostat-card-editor.ts index 575d8d6b2e..862613d987 100644 --- a/src/panels/lovelace/editor/config-elements/hui-thermostat-card-editor.ts +++ b/src/panels/lovelace/editor/config-elements/hui-thermostat-card-editor.ts @@ -84,7 +84,7 @@ export class HuiThermostatCardEditor extends LitElement .hass=${this.hass} .value="${this._theme}" .configValue="${"theme"}" - @theme-changed="${this._valueChanged}" + @value-changed="${this._valueChanged}" > `; diff --git a/src/panels/lovelace/editor/config-elements/hui-weather-forecast-card-editor.ts b/src/panels/lovelace/editor/config-elements/hui-weather-forecast-card-editor.ts index 4a25c8ae2d..d4ae31d7ea 100644 --- a/src/panels/lovelace/editor/config-elements/hui-weather-forecast-card-editor.ts +++ b/src/panels/lovelace/editor/config-elements/hui-weather-forecast-card-editor.ts @@ -83,7 +83,7 @@ export class HuiWeatherForecastCardEditor extends LitElement .hass=${this.hass} .value="${this._theme}" .configValue="${"theme"}" - @theme-changed="${this._valueChanged}" + @value-changed="${this._valueChanged}" > `; diff --git a/src/panels/lovelace/editor/view-editor/hui-view-editor.ts b/src/panels/lovelace/editor/view-editor/hui-view-editor.ts index 90baf57453..baeb0aa393 100644 --- a/src/panels/lovelace/editor/view-editor/hui-view-editor.ts +++ b/src/panels/lovelace/editor/view-editor/hui-view-editor.ts @@ -116,7 +116,7 @@ export class HuiViewEditor extends LitElement { .hass=${this.hass} .value=${this._theme} .configValue=${"theme"} - @theme-changed=${this._valueChanged} + @value-changed=${this._valueChanged} > >(superClass: T) => subscribeThemes(this.hass!.connection, (themes) => { this._updateHass({ themes }); + invalidateThemeCache(); this._applyTheme(); }); } @@ -36,8 +40,21 @@ export default >(superClass: T) => applyThemesOnElement( document.documentElement, this.hass!.themes, - this.hass!.selectedTheme, - true + this.hass!.selectedTheme || this.hass!.themes.default_theme ); + + const meta = document.querySelector("meta[name=theme-color]"); + const headerColor = getComputedStyle( + document.documentElement + ).getPropertyValue("--app-header-background-color"); + if (meta) { + if (!meta.hasAttribute("default-content")) { + meta.setAttribute("default-content", meta.getAttribute("content")!); + } + const themeColor = + headerColor.trim() || + (meta.getAttribute("default-content") as string); + meta.setAttribute("content", themeColor); + } } }; diff --git a/src/translations/en.json b/src/translations/en.json index 5d0c6b5443..0bfbd33757 100755 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -2068,6 +2068,7 @@ "tap_action": "Tap Action", "title": "Title", "theme": "Theme", + "no_theme": "No theme", "unit": "Unit", "url": "Url", "state": "State" From 41a2d9604e69fb44d7197a8459b91b91336940e7 Mon Sep 17 00:00:00 2001 From: HomeAssistant Azure Date: Sat, 21 Mar 2020 00:32:47 +0000 Subject: [PATCH 26/66] [ci skip] Translation update --- translations/ca.json | 1 + translations/en.json | 15 +++++--- translations/fa.json | 88 ++++++++++++++++++++++++++++++++++++++++++-- translations/ru.json | 2 +- translations/uk.json | 31 +++++++++++++++- 5 files changed, 126 insertions(+), 11 deletions(-) diff --git a/translations/ca.json b/translations/ca.json index 0c0e33362f..f2a5e8b460 100644 --- a/translations/ca.json +++ b/translations/ca.json @@ -2252,6 +2252,7 @@ "edit_card": { "add": "Afegir targeta", "delete": "Elimina", + "duplicate": "Duplica targeta", "edit": "Editar", "header": "(configuració de la targeta)", "move": "Mou", diff --git a/translations/en.json b/translations/en.json index e573233a1e..c41bec6b75 100644 --- a/translations/en.json +++ b/translations/en.json @@ -621,7 +621,7 @@ "dismiss": "Dismiss", "editor": { "confirm_delete": "Are you sure you want to delete this entry?", - "delete": "DELETE", + "delete": "Delete", "enabled_cause": "Disabled by {cause}.", "enabled_description": "Disabled entities will not be added to Home Assistant.", "enabled_label": "Enable entity", @@ -631,7 +631,7 @@ "name": "Name Override", "note": "Note: this might not work yet with all integrations.", "unavailable": "This entity is not currently available.", - "update": "UPDATE" + "update": "Update" }, "no_unique_id": "This entity does not have a unique ID, therefore its settings cannot be managed from the UI.", "related": "Related", @@ -816,14 +816,14 @@ }, "description": "Overview of all areas in your home.", "editor": { - "create": "CREATE", + "create": "Create", "default_name": "New Area", - "delete": "DELETE", - "update": "UPDATE" + "delete": "Delete", + "update": "Update" }, "no_areas": "Looks like you have no areas yet!", "picker": { - "create_area": "CREATE AREA", + "create_area": "Create Area", "header": "Areas", "integrations_page": "Integrations page", "introduction": "Areas are used to organize where devices are. This information will be used throughout Home Assistant to help you in organizing your interface, permissions and integrations with other systems.", @@ -1310,6 +1310,7 @@ "automations": "Automations", "cant_edit": "You can only edit items that are created in the UI.", "caption": "Devices", + "confirm_delete": "Are you sure you want to delete this device?", "confirm_rename_entity_ids": "Do you also want to rename the entity id's of your entities?", "data_table": { "area": "Area", @@ -1320,6 +1321,7 @@ "model": "Model", "no_devices": "No devices" }, + "delete": "Delete", "description": "Manage connected devices", "details": "Here are all the details of your device.", "device_not_found": "Device not found.", @@ -2157,6 +2159,7 @@ "maximum": "Maximum", "minimum": "Minimum", "name": "Name", + "no_theme": "No theme", "refresh_interval": "Refresh Interval", "show_icon": "Show Icon?", "show_name": "Show Name?", diff --git a/translations/fa.json b/translations/fa.json index 4edb3cdf31..a37f26e9e4 100644 --- a/translations/fa.json +++ b/translations/fa.json @@ -12,9 +12,11 @@ "binary_sensor": "حسگر باینری", "calendar": "تقویم", "camera": "دوربین", + "climate": "آب و هوا", "configurator": "تنظیم کننده", "conversation": "گفتگو", "cover": "پوشش", + "device_tracker": "ردیاب", "fan": "فن", "group": "گروه", "hassio": "Hass.io", @@ -26,10 +28,13 @@ "lovelace": "Lovelace", "mailbox": "میل باکس", "person": "فرد", + "scene": "صحنه", + "script": "اسکریپت", "sensor": "سنسور", "sun": "آفتاب", "switch": "سوئیچ", "system_health": "سلامت سیستم", + "updater": "به روز رسان", "vacuum": "خلاء", "weblink": "لینک سایت", "zha": "ZHA", @@ -115,6 +120,10 @@ "off": "عادی", "on": "سرد" }, + "connectivity": { + "off": "قطع ", + "on": "متصل" + }, "default": { "off": "خاموش", "on": "روشن" @@ -356,6 +365,9 @@ "last_triggered": "آخرین ماشه", "trigger": "ماشه" }, + "camera": { + "not_available": "تصویر در دسترس نیست" + }, "climate": { "aux_heat": "Aux گرما", "away_mode": "حالت بیرون", @@ -433,6 +445,8 @@ } }, "common": { + "cancel": "لغو", + "loading": "در حال بارگذاری", "save": "ذخیره" }, "components": { @@ -459,6 +473,14 @@ } }, "dialogs": { + "helper_settings": { + "input_datetime": { + "date": "تاریخ", + "datetime": "تاریخ و زمان", + "mode": "چه چیزی را می خواهید وارد کنید", + "time": "زمان" + } + }, "more_info_control": { "script": { "last_action": "آخرین اقدام" @@ -506,6 +528,10 @@ "areas": { "caption": "ثبت نام منطقه", "create_area": "ایجاد منطقه", + "delete": { + "confirmation_text": "هیچیک از درستگاه های این ناحیه اختصاص داده نشده اند", + "confirmation_title": "آیا مطمئنید که می خواهید این ناحیه را حذف کنید ؟" + }, "description": "بررسی کلیه مناطق خانه شما", "editor": { "create": "ايجاد كردن", @@ -684,6 +710,7 @@ "description_not_login": "وارد نشده اید" }, "core": { + "caption": "عمومی", "section": { "core": { "core_config": { @@ -728,6 +755,11 @@ "introduction": "نویسه ویژگی های هر سازمانی. سفارشی سازی اضافه شده / ویرایش شده فورا اثر می کند. سفارشی های حذف شده هنگامی که موجودیت به روز می شود اثر می کند." } }, + "devices": { + "data_table": { + "no_devices": "دستگاهی وجود ندارد" + } + }, "entities": { "caption": "ثبت منطقه", "description": "مرور کلیه اشخاص شناخته شده.", @@ -742,6 +774,9 @@ "integrations_page": "صفحه ادغام", "introduction": "دستیار خانه نگهداری رجیستری از هر نهاد که تا به حال دیده است که می تواند منحصر به فرد شناسایی شده است. هر یک از این نهاد ها یک شناسه نهادی اختصاص داده است که فقط برای این نهاد محفوظ خواهد ماند.", "introduction2": "از رجیستر entity استفاده کنید تا نام را عوض کند، شناسه موجودیت را تغییر دهید یا ورودی را از صفحه اصلی دستیار حذف کنید. توجه داشته باشید، از بین بردن ورودی رجیستر entity entity entity را حذف نخواهد کرد. برای انجام این کار، پیوند زیر را دنبال کنید و آن را از صفحه ی ادغام حذف کنید.", + "status": { + "restored": "بازیابی شد" + }, "unavailable": "(در دسترس نیست)" } }, @@ -764,7 +799,8 @@ "external_step": { "description": "این مرحله نیاز به بازدید از وب سایت خارجی دارد که باید تکمیل شود.", "open_site": "باز کردن سایت" - } + }, + "loading_first_time": "لطفاً منتظر بمانید تا ادغام نصب شود" }, "configure": "پیکربندی", "configured": "پیکربندی شده", @@ -774,6 +810,24 @@ "none": "هیچ چیز پیکربندی نشده است" }, "introduction": "در اینجا می توانید اجزای خود و صفحه اصلی دستیار را پیکربندی کنید. ", + "lovelace": { + "dashboards": { + "default_dashboard": "این داشبورد پیش فرض است", + "detail": { + "title_required": "عنوان مورد نیاز است." + } + }, + "resources": { + "detail": { + "create": "ایجاد کن", + "delete": "پاک کن", + "update": "به روز رسانی" + }, + "picker": { + "no_resources": "منابعی وجود ندارد" + } + } + }, "person": { "caption": "افراد", "description": "مدیریت افراد خانه هوشمند", @@ -885,9 +939,12 @@ "title": "رویدادها" }, "info": { + "icons_by": "آیکون توسط", + "server": "سرور", "title": "اطلاعات" }, "logs": { + "refresh": "تازه کن", "title": "وقایع" }, "mqtt": { @@ -937,7 +994,14 @@ }, "editor": { "card": { + "conditional": { + "card": "کارت", + "conditions": "شرایط", + "current_state": "جاری" + }, "generic": { + "manual": "دستی", + "manual_description": "آیا نیاز به اضافه کردن کارت سفارشی دارید یا فقط می خواهید yaml را به صورت دستی بنویسید؟", "maximum": "بیشترین", "minimum": "کمترین", "name": "نام", @@ -945,6 +1009,7 @@ "show_icon": "نمایش آیکون؟", "show_name": "نمایش نام؟", "show_state": "نمایش وضعیت؟", + "state": "وضعیت", "theme": "زمینه", "title": "عنوان", "unit": "واحد", @@ -987,6 +1052,7 @@ "edit_card": { "add": "افزودن کارت", "delete": "حذف", + "duplicate": "کارت تکراری", "edit": "ویرایش", "pick_card": "کارتی را که می خواهید اضافه کنید انتخاب کنید ؛", "save": "ذخیره", @@ -994,7 +1060,11 @@ }, "edit_view": { "add": "افزودن نمایه", - "edit": "ویرایش نما" + "edit": "ویرایش نما", + "tab_visibility": "رویت پذیری", + "visibility": { + "select_users": "انتخاب کنید کدام کاربران باید این نمای را در پیمایش ببینند" + } }, "header": "ویرایش رابط کاربری", "menu": { @@ -1013,6 +1083,7 @@ }, "save_config": { "cancel": "بیخیال", + "close": "ببند", "header": "کنترل UI Lovelace خود را بگیرید", "para": "به طور پیش فرض Home Assistant رابط کاربر خود را حفظ می کند، آن را به روز می کند زمانی که موجودیت های جدید و یا اجزای Lovelace در دسترس قرار گیرد. اگر کنترل داشته باشید دیگر تغییرات را برای شما انجام نخواهیم داد.", "para_sure": "آیا مطمئن هستید که میخواهید کنترل رابط کاربری خود را کنترل کنید؟", @@ -1022,15 +1093,25 @@ "menu": { "help": "کمک", "refresh": "تازه کردن", + "reload_resources": "بارگذاری مجدد منابع", "unused_entities": "نهادهای استفاده نشده" }, "reload_lovelace": "بازنگری Lovelace", + "reload_resources": { + "refresh_body": "شما باید صفحه را تازه سازی کنید تا بارگذاری مجدد را کامل کنید ، آیا می خواهید اکنون دوباره آن را تازه کنید ؟", + "refresh_header": "آیا می خواهید تازه سازی کنید ؟" + }, + "views": { + "confirm_delete_existing_cards": "با حذف این نمای کارت ها نیز حذف می شود" + }, "warning": { + "attribute_not_found": "ویژگی {attribute} در دسترس نیست:: {entity}", "entity_non_numeric": "نهاد غیر عددی است: {entity}", "entity_not_found": "نهاد موجود نیست: {entity}" } }, "mailbox": { + "delete_button": "پاک کن", "empty": "شما پیامی ندارید" }, "page-authorize": { @@ -1175,7 +1256,8 @@ } }, "shopping-list": { - "add_item": "اضافه کردن آیتم" + "add_item": "اضافه کردن آیتم", + "clear_completed": "کامل شده ها را پاک کن" } }, "sidebar": { diff --git a/translations/ru.json b/translations/ru.json index f591f287e3..31455be037 100644 --- a/translations/ru.json +++ b/translations/ru.json @@ -1524,7 +1524,7 @@ "title_required": "Обязательное поле", "update": "Обновить", "url": "URL-адрес", - "url_error_msg": "URL не может содержать пробелы или специальные символы, кроме символов _ и -" + "url_error_msg": "URL должен содержать - и не может содержать пробелов или специальных символов, за исключением _ и -" }, "picker": { "add_dashboard": "Добавить панель", diff --git a/translations/uk.json b/translations/uk.json index de7fb05e7d..f7d9625df0 100644 --- a/translations/uk.json +++ b/translations/uk.json @@ -590,6 +590,14 @@ "domain_toggler": { "title": "Переключення доменів" }, + "helper_settings": { + "input_datetime": { + "date": "Дата", + "datetime": "Дата і час", + "mode": "Що ви хочете ввести", + "time": "Час" + } + }, "more_info_control": { "dismiss": "Відхилити", "edit": "Редагувати об'єкт", @@ -1189,7 +1197,8 @@ "device": "Пристрій", "integration": "Інтеграція", "manufacturer": "Виробник", - "model": "Модель" + "model": "Модель", + "no_devices": "Немає пристроїв" }, "description": "Керування підключеними пристроями", "details": "Тут ви знайдете всі деталі вашого пристрою.", @@ -1273,6 +1282,7 @@ }, "failed_create_area": "Не вдалося створити приміщення.", "finish": "Закінчити", + "loading_first_time": "Зачекайте, поки інсталюється інтеграція", "name_new_area": "Назва нового приміщення?", "not_all_required_fields": "Не всі обов'язкові поля заповнені.", "submit": "Надіслати" @@ -1301,6 +1311,16 @@ "note_about_website_reference": "Більше можна знайти на" }, "introduction": "Тут можна налаштувати свої компоненти та Home Assistant. Не все можна налаштувати з інтерфейсу користувача, але ми працюємо над цим.", + "lovelace": { + "dashboards": { + "default_dashboard": "Це стандартна панель" + }, + "resources": { + "picker": { + "no_resources": "Немає ресурсів" + } + } + }, "person": { "add_person": "Додати Людини", "caption": "Особи", @@ -1875,9 +1895,11 @@ "name": "Список покупок" }, "thermostat": { + "description": "Картка термостата забезпечує контроль вашої кліматичної сутності. Дозволяє змінювати температуру та режим сутності.", "name": "Термостат" }, "vertical-stack": { + "description": "Картка \"вертикальний стек\" дозволяє згрупувати кілька карток, щоб вони завжди знаходились в одній колонці.", "name": "Вертикальний стек" }, "weather-forecast": { @@ -1888,6 +1910,7 @@ "edit_card": { "add": "Додати картку", "delete": "Видалити", + "duplicate": "Дублювати", "edit": "Редагувати", "header": "Конфігурація картки", "move": "Перейти до перегляду", @@ -1959,9 +1982,14 @@ "exit_edit_mode": "Вийти з режиму редагування інтерфейсу користувача", "help": "Допомога", "refresh": "Оновити", + "reload_resources": "Перезавантажити ресурси", "unused_entities": "Незадіяні об'єкти" }, "reload_lovelace": "Перезавантажити Lovelace", + "reload_resources": { + "refresh_body": "Для завершення перезавантаження потрібно оновити сторінку. Оновити зараз?", + "refresh_header": "Оновити?" + }, "unused_entities": { "available_entities": "Це доступні об'єкти, які відсутні у Lovelace UI.", "domain": "Домен", @@ -1976,6 +2004,7 @@ "existing_cards": "Ви не можете видалити подання, у якому є картки. Спочатку видаліть картки." }, "warning": { + "attribute_not_found": "Атрибут {attribute} недоступний у: {entity}", "entity_non_numeric": "Об'єкт не є числовим: {entity}", "entity_not_found": "Об'єкт не доступний: {entity}" } From 02e01626f505fa7e063c8cc7d0e8b046e3326ec7 Mon Sep 17 00:00:00 2001 From: Robert Resch Date: Sat, 21 Mar 2020 15:15:20 +0100 Subject: [PATCH 27/66] fix #5300: always show attribute step (#5302) --- .../helpers/forms/ha-input_number-form.ts | 23 ++++++++----------- src/translations/en.json | 2 +- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/src/panels/config/helpers/forms/ha-input_number-form.ts b/src/panels/config/helpers/forms/ha-input_number-form.ts index a09e920b17..99a4dddf14 100644 --- a/src/panels/config/helpers/forms/ha-input_number-form.ts +++ b/src/panels/config/helpers/forms/ha-input_number-form.ts @@ -132,19 +132,16 @@ class HaInputNumberForm extends LitElement { - ${this._mode === "slider" - ? html` - - ` - : ""} + + Date: Sat, 21 Mar 2020 15:59:30 +0100 Subject: [PATCH 28/66] Optimize cards for horizontal stack (#5254) --- src/panels/lovelace/cards/hui-button-card.ts | 3 + .../lovelace/cards/hui-entities-card.ts | 3 + src/panels/lovelace/cards/hui-gauge-card.ts | 8 +- src/panels/lovelace/cards/hui-light-card.ts | 95 +++++++++++-------- 4 files changed, 67 insertions(+), 42 deletions(-) diff --git a/src/panels/lovelace/cards/hui-button-card.ts b/src/panels/lovelace/cards/hui-button-card.ts index 976bb6bbe8..250a90b8ea 100644 --- a/src/panels/lovelace/cards/hui-button-card.ts +++ b/src/panels/lovelace/cards/hui-button-card.ts @@ -228,6 +228,9 @@ export class HuiButtonCard extends LitElement implements LovelaceCard { text-align: center; padding: 4% 0; font-size: 1.2rem; + height: 100%; + box-sizing: border-box; + justify-content: center; } ha-card:focus { diff --git a/src/panels/lovelace/cards/hui-entities-card.ts b/src/panels/lovelace/cards/hui-entities-card.ts index d738c4d2c4..954d10c00e 100644 --- a/src/panels/lovelace/cards/hui-entities-card.ts +++ b/src/panels/lovelace/cards/hui-entities-card.ts @@ -185,6 +185,9 @@ class HuiEntitiesCard extends LitElement implements LovelaceCard { static get styles(): CSSResult { return css` + ha-card { + height: 100%; + } .card-header { display: flex; justify-content: space-between; diff --git a/src/panels/lovelace/cards/hui-gauge-card.ts b/src/panels/lovelace/cards/hui-gauge-card.ts index df0ac3dbb0..59fb921970 100644 --- a/src/panels/lovelace/cards/hui-gauge-card.ts +++ b/src/panels/lovelace/cards/hui-gauge-card.ts @@ -249,6 +249,12 @@ class HuiGaugeCard extends LitElement implements LovelaceCard { ha-card { cursor: pointer; padding: 16px 16px 0 16px; + height: 100%; + display: flex; + flex-direction: column; + box-sizing: border-box; + justify-content: center; + align-items: center; } ha-card:focus { outline: none; @@ -259,8 +265,6 @@ class HuiGaugeCard extends LitElement implements LovelaceCard { height: calc(var(--base-unit) * 2); overflow: hidden; position: relative; - text-align: center; - margin: auto; } .gauge-a { position: absolute; diff --git a/src/panels/lovelace/cards/hui-light-card.ts b/src/panels/lovelace/cards/hui-light-card.ts index 7c01371fa3..133bf7245f 100644 --- a/src/panels/lovelace/cards/hui-light-card.ts +++ b/src/panels/lovelace/cards/hui-light-card.ts @@ -116,40 +116,45 @@ export class HuiLightCard extends LitElement implements LovelaceCard { tabindex="0" > -
-
- - +
+
+
+ ${supportsFeature(stateObj, SUPPORT_BRIGHTNESS) + ? html` + + ` + : ""} + +
-
-
-
- % +
+
+ % +
+ ${this._config.name || computeStateName(stateObj)}
- ${this._config.name || computeStateName(stateObj)}
`; @@ -256,6 +261,8 @@ export class HuiLightCard extends LitElement implements LovelaceCard { } ha-card { + height: 100%; + box-sizing: border-box; position: relative; overflow: hidden; text-align: center; @@ -273,6 +280,13 @@ export class HuiLightCard extends LitElement implements LovelaceCard { z-index: 25; } + .content { + height: 100%; + display: flex; + flex-direction: column; + justify-content: center; + } + #controls { display: flex; justify-content: center; @@ -298,13 +312,6 @@ export class HuiLightCard extends LitElement implements LovelaceCard { color: var(--paper-item-icon-color, #44739e); width: 60%; height: auto; - position: absolute; - max-width: calc(100% - 40px); - box-sizing: border-box; - border-radius: 100%; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); } .light-button.state-on { @@ -315,9 +322,17 @@ export class HuiLightCard extends LitElement implements LovelaceCard { color: var(--state-icon-unavailable-color); } + .slider-center { + position: absolute; + max-width: calc(100% - 40px); + box-sizing: border-box; + border-radius: 100%; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + } + #info { - display: flex-vertical; - justify-content: center; text-align: center; margin-top: -56px; padding: 16px; From 1950656bd52c7b88f30a2d60cc815374c0421ba1 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Sat, 21 Mar 2020 16:51:44 +0100 Subject: [PATCH 29/66] Add ability to edit panel view cards (#5257) * Add ability to edit panel view cards * Localize and fix some styling --- src/panels/lovelace/cards/hui-iframe-card.ts | 6 +++ src/panels/lovelace/cards/hui-map-card.ts | 6 +++ src/panels/lovelace/hui-root.ts | 2 + src/panels/lovelace/types.ts | 1 + src/panels/lovelace/views/hui-panel-view.ts | 49 ++++++++++++++++++-- src/panels/lovelace/views/hui-view.ts | 1 + src/translations/en.json | 8 +--- 7 files changed, 63 insertions(+), 10 deletions(-) diff --git a/src/panels/lovelace/cards/hui-iframe-card.ts b/src/panels/lovelace/cards/hui-iframe-card.ts index 65882e0774..bd8d0b2d27 100644 --- a/src/panels/lovelace/cards/hui-iframe-card.ts +++ b/src/panels/lovelace/cards/hui-iframe-card.ts @@ -32,6 +32,8 @@ export class HuiIframeCard extends LitElement implements LovelaceCard { } @property({ type: Boolean, reflect: true }) public isPanel = false; + @property({ type: Boolean, reflect: true }) + public editMode = false; @property() protected _config?: IframeCardConfig; public getCardSize(): number { @@ -88,6 +90,10 @@ export class HuiIframeCard extends LitElement implements LovelaceCard { height: 100%; } + :host([ispanel][editMode]) ha-card { + height: calc(100% - 51px); + } + ha-card { overflow: hidden; } diff --git a/src/panels/lovelace/cards/hui-map-card.ts b/src/panels/lovelace/cards/hui-map-card.ts index d59be48059..6c751696d7 100644 --- a/src/panels/lovelace/cards/hui-map-card.ts +++ b/src/panels/lovelace/cards/hui-map-card.ts @@ -63,6 +63,8 @@ class HuiMapCard extends LitElement implements LovelaceCard { @property({ type: Boolean, reflect: true }) public isPanel = false; + @property({ type: Boolean, reflect: true }) + public editMode = false; @property() private _config?: MapCardConfig; @@ -460,6 +462,10 @@ class HuiMapCard extends LitElement implements LovelaceCard { height: 100%; } + :host([ispanel][editMode]) ha-card { + height: calc(100% - 51px); + } + ha-card { overflow: hidden; } diff --git a/src/panels/lovelace/hui-root.ts b/src/panels/lovelace/hui-root.ts index 0e26475ca4..484dec9afe 100644 --- a/src/panels/lovelace/hui-root.ts +++ b/src/panels/lovelace/hui-root.ts @@ -701,6 +701,8 @@ class HUIRoot extends LitElement { if (viewConfig.panel && viewConfig.cards && viewConfig.cards.length > 0) { view = document.createElement("hui-panel-view"); view.config = viewConfig; + view.lovelace = this.lovelace; + view.index = viewIndex; } else { view = document.createElement("hui-view"); view.lovelace = this.lovelace; diff --git a/src/panels/lovelace/types.ts b/src/panels/lovelace/types.ts index bede948a08..3a6d042fcf 100644 --- a/src/panels/lovelace/types.ts +++ b/src/panels/lovelace/types.ts @@ -33,6 +33,7 @@ export interface LovelaceBadge extends HTMLElement { export interface LovelaceCard extends HTMLElement { hass?: HomeAssistant; isPanel?: boolean; + editMode?: boolean; getCardSize(): number; setConfig(config: LovelaceCardConfig): void; } diff --git a/src/panels/lovelace/views/hui-panel-view.ts b/src/panels/lovelace/views/hui-panel-view.ts index fbceb6ef51..2eeb64a27c 100644 --- a/src/panels/lovelace/views/hui-panel-view.ts +++ b/src/panels/lovelace/views/hui-panel-view.ts @@ -8,14 +8,18 @@ import { import { applyThemesOnElement } from "../../../common/dom/apply_themes_on_element"; import { HomeAssistant } from "../../../types"; -import { LovelaceCard } from "../types"; +import { LovelaceCard, Lovelace } from "../types"; import { createCardElement } from "../create-element/create-card-element"; import { LovelaceViewConfig } from "../../../data/lovelace"; +let editCodeLoaded = false; + @customElement("hui-panel-view") export class HUIPanelView extends UpdatingElement { @property() public hass?: HomeAssistant; + @property() public lovelace?: Lovelace; @property() public config?: LovelaceViewConfig; + @property({ type: Number }) public index!: number; protected firstUpdated(changedProperties: PropertyValues): void { super.firstUpdated(changedProperties); @@ -26,11 +30,25 @@ export class HUIPanelView extends UpdatingElement { super.update(changedProperties); const hass = this.hass!; + const lovelace = this.lovelace!; const hassChanged = changedProperties.has("hass"); const oldHass = changedProperties.get("hass") as this["hass"] | undefined; const configChanged = changedProperties.has("config"); - if (configChanged) { + if (lovelace.editMode && !editCodeLoaded) { + editCodeLoaded = true; + import(/* webpackChunkName: "hui-view-editable" */ "./hui-view-editable"); + } + + let editModeChanged = false; + + if (changedProperties.has("lovelace")) { + const oldLovelace = changedProperties.get("lovelace") as Lovelace; + editModeChanged = + !oldLovelace || lovelace.editMode !== oldLovelace.editMode; + } + + if (editModeChanged || configChanged) { this._createCard(); } else if (hassChanged) { (this.lastChild! as LovelaceCard).hass = this.hass; @@ -48,14 +66,37 @@ export class HUIPanelView extends UpdatingElement { } private _createCard(): void { - if (this.lastChild) { + while (this.lastChild) { this.removeChild(this.lastChild); } const card: LovelaceCard = createCardElement(this.config!.cards![0]); card.hass = this.hass; card.isPanel = true; - this.appendChild(card); + + if (!this.lovelace!.editMode) { + this.appendChild(card); + return; + } + + const wrapper = document.createElement("hui-card-options"); + wrapper.hass = this.hass; + wrapper.lovelace = this.lovelace; + wrapper.path = [this.index, 0]; + card.editMode = true; + wrapper.appendChild(card); + this.appendChild(wrapper); + if (this.config!.cards!.length > 1) { + const warning = document.createElement("hui-warning"); + warning.setAttribute( + "style", + "position: absolute; top: 0; width: 100%; box-sizing: border-box;" + ); + warning.innerText = this.hass!.localize( + "ui.panel.lovelace.editor.view.panel_mode.warning_multiple_cards" + ); + this.appendChild(warning); + } } } diff --git a/src/panels/lovelace/views/hui-view.ts b/src/panels/lovelace/views/hui-view.ts index 33c14dfbd0..e0d7c087de 100644 --- a/src/panels/lovelace/views/hui-view.ts +++ b/src/panels/lovelace/views/hui-view.ts @@ -298,6 +298,7 @@ export class HUIView extends LitElement { wrapper.hass = this.hass; wrapper.lovelace = this.lovelace; wrapper.path = [this.index!, cardIndex]; + element.editMode = true; wrapper.appendChild(element); elementsToAppend.push(wrapper); }); diff --git a/src/translations/en.json b/src/translations/en.json index c36b5d606a..b1b057d4dd 100755 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -2137,7 +2137,8 @@ "view": { "panel_mode": { "title": "Panel Mode?", - "description": "This renders the first card at full width; other cards in this view will not be rendered." + "description": "This renders the first card at full width; other cards in this view will not be rendered.", + "warning_multiple_cards": "This view contains more than one card, but a panel view can only show 1 card." } } }, @@ -2393,11 +2394,6 @@ "tabs": { "info": { "title": "Info", - "remove": "Remove", - "set": "Set", - "default_ui": "{action} {name} as default page on this device", - "lovelace_ui": "Go to the Lovelace UI", - "states_ui": "Go to the states UI", "home_assistant_logo": "Home Assistant logo", "path_configuration": "Path to configuration.yaml: {path}", "developed_by": "Developed by a bunch of awesome people.", From f2578a58b4debdfdb256aea9102bbc93b4900af6 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sat, 21 Mar 2020 13:20:06 -0500 Subject: [PATCH 30/66] Add "gate" device class for DEVICE_CLASS_GATE (#5299) * Add "gate" device class for DEVICE_CLASS_GATE Gates are found outside of a structure and are typically part of a fence. When opening or closing a garage door, it was impossible to tell if you had hit the button or not even though the underlying state was reported as "opening". This lead to confusion and multiple clicks to open a garage door which can cause the door to stop opening and result in frustration. Add icons for gate and garage opening and closing states. * Add "gate" device class for DEVICE_CLASS_GATE Gates are found outside of a structure and are typically part of a fence. When opening or closing a garage door, it was impossible to tell if you had hit the button or not even though the underlying state was reported as "opening". This lead to confusion and multiple clicks to open a garage door which can cause the door to stop opening and result in frustration. Add icons for gate and garage opening and closing states. * de-bold --- src/common/entity/cover_icon.ts | 47 ++++++++++++++++++++++++++++++-- src/common/entity/domain_icon.ts | 11 +++++++- 2 files changed, 54 insertions(+), 4 deletions(-) diff --git a/src/common/entity/cover_icon.ts b/src/common/entity/cover_icon.ts index 13eb5cd9de..faa7e29890 100644 --- a/src/common/entity/cover_icon.ts +++ b/src/common/entity/cover_icon.ts @@ -4,17 +4,58 @@ import { domainIcon } from "./domain_icon"; export const coverIcon = (state: HassEntity): string => { const open = state.state !== "closed"; + switch (state.attributes.device_class) { case "garage": - return open ? "hass:garage-open" : "hass:garage"; + switch (state.state) { + case "opening": + return "hass:arrow-up-box"; + case "closing": + return "hass:arrow-down-box"; + case "closed": + return "hass:garage"; + default: + return "hass:garage-open"; + } + case "gate": + switch (state.state) { + case "opening": + case "closing": + return "hass:gate-arrow-right"; + case "closed": + return "hass:gate"; + default: + return "hass:gate-open"; + } case "door": return open ? "hass:door-open" : "hass:door-closed"; + case "damper": + return open ? "hass:circle" : "hass:circle-slice-8"; case "shutter": return open ? "hass:window-shutter-open" : "hass:window-shutter"; case "blind": - return open ? "hass:blinds-open" : "hass:blinds"; + case "curtain": + switch (state.state) { + case "opening": + return "hass:arrow-up-box"; + case "closing": + return "hass:arrow-down-box"; + case "closed": + return "hass:blinds"; + default: + return "hass:blinds-open"; + } case "window": - return open ? "hass:window-open" : "hass:window-closed"; + switch (state.state) { + case "opening": + return "hass:arrow-up-box"; + case "closing": + return "hass:arrow-down-box"; + case "closed": + return "hass:window-closed"; + default: + return "hass:window-open"; + } default: return domainIcon("cover", state.state); } diff --git a/src/common/entity/domain_icon.ts b/src/common/entity/domain_icon.ts index baa698de4c..e735df808c 100644 --- a/src/common/entity/domain_icon.ts +++ b/src/common/entity/domain_icon.ts @@ -77,7 +77,16 @@ export const domainIcon = (domain: string, state?: string): string => { : "hass:checkbox-marked-circle"; case "cover": - return state === "closed" ? "hass:window-closed" : "hass:window-open"; + switch (state) { + case "opening": + return "hass:arrow-up-box"; + case "closing": + return "hass:arrow-down-box"; + case "closed": + return "hass:window-closed"; + default: + return "hass:window-open"; + } case "lock": return state && state === "unlocked" ? "hass:lock-open" : "hass:lock"; From 7170f06c08d0bfb73d314080289c654a76420551 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Sat, 21 Mar 2020 20:18:40 +0100 Subject: [PATCH 31/66] Add checks for arrays in compute unused entities (#5307) --- src/panels/lovelace/common/compute-unused-entities.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/panels/lovelace/common/compute-unused-entities.ts b/src/panels/lovelace/common/compute-unused-entities.ts index eb704fbbaa..2dbcc6905e 100755 --- a/src/panels/lovelace/common/compute-unused-entities.ts +++ b/src/panels/lovelace/common/compute-unused-entities.ts @@ -50,13 +50,13 @@ const addEntities = (entities: Set, obj) => { if (obj.card) { addEntities(entities, obj.card); } - if (obj.cards) { + if (obj.cards && Array.isArray(obj.cards)) { obj.cards.forEach((card) => addEntities(entities, card)); } - if (obj.elements) { + if (obj.elements && Array.isArray(obj.elements)) { obj.elements.forEach((card) => addEntities(entities, card)); } - if (obj.badges) { + if (obj.badges && Array.isArray(obj.badges)) { obj.badges.forEach((badge) => addEntityId(entities, badge)); } }; From b9367a33a862eea30906e15350a4f5191f9adb01 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Sat, 21 Mar 2020 20:19:13 +0100 Subject: [PATCH 32/66] Invalidate theme cache when switching demo's (#5305) * Invalidate theme cache when switching demo's * Move to mock hass --- src/fake_data/provide_hass.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/fake_data/provide_hass.ts b/src/fake_data/provide_hass.ts index 032541f0fe..d09149b72b 100644 --- a/src/fake_data/provide_hass.ts +++ b/src/fake_data/provide_hass.ts @@ -1,4 +1,7 @@ -import { applyThemesOnElement } from "../common/dom/apply_themes_on_element"; +import { + applyThemesOnElement, + invalidateThemeCache, +} from "../common/dom/apply_themes_on_element"; import { demoConfig } from "./demo_config"; import { demoServices } from "./demo_services"; @@ -224,6 +227,7 @@ export const provideHass = ( (eventListeners[event] || []).forEach((fn) => fn(event)); }, mockTheme(theme) { + invalidateThemeCache(); hass().updateHass({ selectedTheme: theme ? "mock" : "default", themes: { From 415a4fa1af8440b80f23f14d2cce2f5824e45f67 Mon Sep 17 00:00:00 2001 From: HomeAssistant Azure Date: Sun, 22 Mar 2020 00:32:46 +0000 Subject: [PATCH 33/66] [ci skip] Translation update --- translations/ca.json | 28 ++++++++++++++++------------ translations/cs.json | 21 ++++++++++++--------- translations/da.json | 15 +++++++++------ translations/de.json | 18 +++++++++++------- translations/en.json | 5 +++-- translations/es.json | 21 +++++++++++++-------- translations/fr.json | 3 +++ translations/ko.json | 3 +++ translations/ru.json | 15 +++++++++------ translations/zh-Hans.json | 3 +++ translations/zh-Hant.json | 3 +++ 11 files changed, 85 insertions(+), 50 deletions(-) diff --git a/translations/ca.json b/translations/ca.json index f2a5e8b460..82f4285a0c 100644 --- a/translations/ca.json +++ b/translations/ca.json @@ -395,8 +395,8 @@ "ui": { "auth_store": { "ask": "Vols desar aquest inici de sessió?", - "confirm": "Desa inici de sessió", - "decline": "No, gràcies" + "confirm": "Si", + "decline": "No" }, "card": { "alarm_control_panel": { @@ -817,7 +817,7 @@ "description": "Visió general de totes les àrees de la casa.", "editor": { "create": "CREAR", - "default_name": "Àrea nova", + "default_name": "Nova àrea", "delete": "ELIMINA", "update": "ACTUALITZAR" }, @@ -1310,6 +1310,7 @@ "automations": "Automatitzacions", "cant_edit": "Només pots editar els elements creats a la interfície d'usuari (UI).", "caption": "Dispositius", + "confirm_delete": "Estàs segur que vols eliminar aquest dispositiu?", "confirm_rename_entity_ids": "Vols, també, canviar el nom dels ID's d’entitat de les entitats?", "data_table": { "area": "Àrea", @@ -1320,6 +1321,7 @@ "model": "Model", "no_devices": "Sense dispositius" }, + "delete": "Suprimeix", "description": "Gestiona els dispositius connectats", "details": "Aquí tens tots els detalls del dispositiu.", "device_not_found": "Dispositiu no trobat.", @@ -1515,13 +1517,13 @@ "delete": "Suprimeix", "dismiss": "Tanca", "edit_dashboard": "Edita el panell", - "icon": "Icona de la barra lateral", + "icon": "Icona", "new_dashboard": "Afegeix un nou panell", "remove_default": "Elimina'l com a predeterminat en aquest dispositiu", "require_admin": "Només administrador", "set_default": "Estableix-lo com a predeterminat en aquest dispositiu", "show_sidebar": "Mostra a la barra lateral", - "title": "Títol de la barra lateral", + "title": "Títol", "title_required": "El títol és necessari.", "update": "Actualitza", "url": "URL", @@ -1537,7 +1539,7 @@ "sidebar": "Mostra a la barra lateral", "title": "Títol" }, - "open": "Obre panell" + "open": "Obrir" } }, "description": "Configura els teus panells Lovelace", @@ -1673,7 +1675,7 @@ "section": { "reloading": { "automation": "Actualitza automatitzacions", - "core": "Actualitza el nucli", + "core": "Recarrega ubicacions i automatitzacions", "group": "Actualitza grups", "heading": "Torna a carregar la configuració", "introduction": "Algunes parts de la configuració de Home Assistant es poden recarregar sense necessitat de reiniciar. Els botons de sota esborraran la configuració antiga i en carregaran la nova.", @@ -2105,6 +2107,7 @@ }, "conditional": { "card": "Targeta", + "change_type": "Canvia el tipus", "condition_explanation": "La targeta es mostrarà quan es compleixin totes les condicions següents.", "conditions": "Condicions", "current_state": "actual", @@ -2156,6 +2159,7 @@ "maximum": "Màxim", "minimum": "Mínim", "name": "Nom", + "no_theme": "Sense temes", "refresh_interval": "Interval d'actualització", "show_icon": "Mostra icona?", "show_name": "Mostra nom?", @@ -2182,7 +2186,7 @@ }, "iframe": { "description": "La targeta pàgina web et permet incrustar els teus llocs web preferits directament a Home Assistant.", - "name": "iFrame" + "name": "Pàgina web" }, "light": { "description": "La targeta llum et permet ajustar la brillantor d'una llum.", @@ -2255,7 +2259,7 @@ "duplicate": "Duplica targeta", "edit": "Editar", "header": "(configuració de la targeta)", - "move": "Mou", + "move": "Moure a la Vista", "options": "Més opcions", "pick_card": "Tria una targeta que vulguis afegir.", "pick_card_view_title": "Quina targeta vols afegir a la visualització {name}?", @@ -2323,7 +2327,7 @@ }, "suggest_card": { "add": "Afegeix a la UI Lovelace", - "create_own": "Crea la teva", + "create_own": "Escull una targeta diferent", "header": "T'hem creat un suggeriment" }, "view": { @@ -2357,14 +2361,14 @@ "title": "Entitats sense utilitzar" }, "views": { - "confirm_delete": "Estàs segur que vols eliminar aquesta visualització?", + "confirm_delete": "Esborrar visualització?", "confirm_delete_existing_cards": "Si elimines aquesta vista, també s'eliminaran les targetes que conté", "confirm_delete_existing_cards_text": "Estàs segur que vols eliminar la vista '{name}'? La vista conté {number} targetes que també s'eliminaran. Aquesta acció no és reversible.", "confirm_delete_text": "Estàs segur que vols eliminar la vista '{name}'?", "existing_cards": "No pots suprimir una visualització si conté targetes, elimina-les primer." }, "warning": { - "attribute_not_found": "L'atribut {attribute} de {entity} no està disponible.", + "attribute_not_found": "L'atribut {attribute} de {entity} no és disponible.", "entity_non_numeric": "Entitat no numèrica: {entity}", "entity_not_found": "Entitat no disponible: {entity}" } diff --git a/translations/cs.json b/translations/cs.json index 5a924b6987..9ea0468af3 100644 --- a/translations/cs.json +++ b/translations/cs.json @@ -395,8 +395,8 @@ "ui": { "auth_store": { "ask": "Chcete toto přihlášení uložit?", - "confirm": "Uložit login", - "decline": "Ne, děkuji" + "confirm": "Ano", + "decline": "Ne" }, "card": { "alarm_control_panel": { @@ -818,7 +818,7 @@ "editor": { "create": "VYTVOŘIT", "default_name": "Nová oblast", - "delete": "SMAZAT", + "delete": "Odstranit", "update": "UPRAVIT" }, "no_areas": "Vypadá to, že ještě nemáte žádné oblasti!", @@ -1053,8 +1053,8 @@ "edit_automation": "Upravit automatizaci", "header": "Editor automatizací", "introduction": "Editor automatizací umožňuje vytvářet a upravovat automatizace. Přečtěte si prosím [pokyny] (https://home-assistant.io/docs/automation/editor/), abyste se ujistili, že jste aplikaci Home Assistant nakonfigurovali správně.", - "learn_more": "Další informace o automatizaci", - "no_automations": "Nelze najít žádnou upravitelnou automatizaci", + "learn_more": "Další informace o automatizacích", + "no_automations": "Nemohli jsme najít žádné upravitelné automatizace", "only_editable": "Upravitelné mohou být pouze automatizace definované v automations.yaml.", "pick_automation": "Vyberte automatizaci, kterou chcete upravit", "show_info_automation": "Zobrazit informace o automatizaci" @@ -1247,7 +1247,7 @@ }, "server_control": { "reloading": { - "automation": "Znovu načíst automatizaci", + "automation": "Znovu načíst automatizace", "core": "Znovu načíst jádro", "group": "Znovu načíst skupiny", "heading": "Konfigurace se načítá", @@ -1310,6 +1310,7 @@ "automations": "Automatizace", "cant_edit": "Můžete upravovat pouze položky, které jsou vytvořeny v uživatelském rozhraní.", "caption": "Zařízení", + "confirm_delete": "Opravdu chcete toto zařízení odstranit?", "confirm_rename_entity_ids": "Chcete také přejmenovat ID entit vašich entit?", "data_table": { "area": "Oblast", @@ -1320,6 +1321,7 @@ "model": "Model", "no_devices": "Žádná zařízení" }, + "delete": "Odstranit", "description": "Správa připojených zařízení", "details": "Zde jsou všechny podrobnosti o vašem zařízení.", "device_not_found": "Zařízení nebylo nalezeno.", @@ -1460,7 +1462,7 @@ "add_area": "Přidat oblast", "area_picker_label": "Oblast", "close": "Zavřít", - "created_config": "Bylo vytvořeno nastavení pro {Name}.", + "created_config": "Bylo vytvořeno nastavení pro {name}.", "dismiss": "Zavřít dialog", "error_saving_area": "Chyba při ukládání oblasti: {error}", "external_step": { @@ -1672,7 +1674,7 @@ "description": "Restart a zastavení serveru Home Asistent", "section": { "reloading": { - "automation": "Znovu načíst automatizaci", + "automation": "Znovu načíst automatizace", "core": "Znovu načíst umístění a přizpůsobení", "group": "Znovu načíst skupiny", "heading": "Konfigurace se načítá", @@ -2157,6 +2159,7 @@ "maximum": "Maximum", "minimum": "Minimum", "name": "Název", + "no_theme": "Žádný motiv", "refresh_interval": "Interval obnovení", "show_icon": "Zobrazit ikonu?", "show_name": "Zobrazit název?", @@ -2358,7 +2361,7 @@ "title": "Nepoužité entity" }, "views": { - "confirm_delete": "Opravdu chcete smazat tento pohled?", + "confirm_delete": "Odstranit zobrazení?", "confirm_delete_existing_cards": "Odstraněním tohoto pohledu dojde také k odebrání karet", "confirm_delete_existing_cards_text": "Opravdu chcete smazat pohled '{name}'? Pohled obsahuje {number} karty, které budou smazány. Tuto akci nelze vrátit zpět.", "confirm_delete_text": "Opravdu chcete smazat pohled '{name}'?", diff --git a/translations/da.json b/translations/da.json index 5f32473f9d..ac4cc152e6 100644 --- a/translations/da.json +++ b/translations/da.json @@ -621,7 +621,7 @@ "dismiss": "Afvis", "editor": { "confirm_delete": "Er du sikker på, at du vil slette denne post?", - "delete": "SLET", + "delete": "Slet", "enabled_cause": "Deaktiveret af {cause}.", "enabled_description": "Deaktiverede entiteter tilføjes ikke til Home Assistant.", "enabled_label": "Aktivér entitet", @@ -631,7 +631,7 @@ "name": "Brugerdefineret navn", "note": "Bemærk: Dette virker muligvis ikke med alle integrationer endnu.", "unavailable": "Denne entitet er ikke tilgængelig i øjeblikket.", - "update": "OPDATER" + "update": "Opdater" }, "no_unique_id": "Denne entitet har ikke et unikt id. Derfor kan dens indstillinger ikke styres fra brugerfladen.", "related": "Relaterede", @@ -816,14 +816,14 @@ }, "description": "Oversigt over alle områder i dit hjem.", "editor": { - "create": "OPRET", + "create": "Opret", "default_name": "Nyt område", - "delete": "SLET", - "update": "OPDATER" + "delete": "Slet", + "update": "Opdater" }, "no_areas": "Du ikke har ingen områder endnu!", "picker": { - "create_area": "OPRET OMRÅDE", + "create_area": "Opret område", "header": "Områder", "integrations_page": "Integrationsside", "introduction": "Områder bruges til at organisere hvor enheder befinder sig. Disse oplysninger vil blive brugt i Home Assistant til at hjælpe dig med at organisere din brugerflade, tilladelser og integrationer med andre systemer.", @@ -1310,6 +1310,7 @@ "automations": "Automatiseringer", "cant_edit": "Du kan kun redigere elementer, der er oprettet i brugerfladen.", "caption": "Enheder", + "confirm_delete": "Er du sikker på, at du vil slette denne enhed?", "confirm_rename_entity_ids": "Vil du også omdøbe entitet-id'et for dine entiteter?", "data_table": { "area": "Område", @@ -1320,6 +1321,7 @@ "model": "Model", "no_devices": "Ingen enheder" }, + "delete": "Slet", "description": "Administrer tilsluttede enheder", "details": "Her er alle oplysninger om din enhed.", "device_not_found": "Enhed blev ikke fundet.", @@ -2157,6 +2159,7 @@ "maximum": "Maksimum", "minimum": "Minimum", "name": "Navn", + "no_theme": "Intet tema", "refresh_interval": "Opdateringsinterval", "show_icon": "Vis ikon?", "show_name": "Vis navn?", diff --git a/translations/de.json b/translations/de.json index 0ce36f0fb8..66dabd03a5 100644 --- a/translations/de.json +++ b/translations/de.json @@ -621,7 +621,7 @@ "dismiss": "Ausblenden", "editor": { "confirm_delete": "Möchtest Du diesen Eintrag wirklich löschen?", - "delete": "LÖSCHEN", + "delete": "Löschen", "enabled_cause": "Deaktiviert durch {cause}.", "enabled_description": "Deaktivierte Entitäten werden nicht zu Home Assistant hinzugefügt.", "enabled_label": "Entität aktivieren", @@ -631,7 +631,7 @@ "name": "Namen überschreiben", "note": "Hinweis: Dies funktioniert möglicherweise noch nicht bei allen Integrationen.", "unavailable": "Diese Entität ist derzeit nicht verfügbar.", - "update": "AKTUALISIEREN" + "update": "Aktualisieren" }, "no_unique_id": "Diese Entität hat keine eindeutige ID, daher können die Einstellungen nicht über die UI verwaltet werden.", "related": "Verwandte", @@ -816,14 +816,14 @@ }, "description": "Überblick über alle Bereiche in Deinem Haus.", "editor": { - "create": "ERSTELLEN", + "create": "Erstellen", "default_name": "Neuer Bereich", - "delete": "LÖSCHEN", - "update": "AKTUALISIEREN" + "delete": "Löschen", + "update": "Aktualisieren" }, "no_areas": "Sieht aus, als hätten Sie noch keine Bereiche!", "picker": { - "create_area": "BEREICH ERSTELLEN", + "create_area": "Bereich erstellen", "header": "Bereiche", "integrations_page": "Integrationsseite", "introduction": "In Bereichen wird festgelegt, wo sich Geräte befinden. Diese Informationen werden in Home Assistant verwendet, um Sie bei der Organisation Ihrer Benutzeroberfläche, Berechtigungen und Integrationen mit anderen Systemen zu unterstützen.", @@ -1310,6 +1310,7 @@ "automations": "Automatisierungen", "cant_edit": "Du kannst nur Elemente bearbeiten, die in der Benutzeroberfläche erstellt wurden.", "caption": "Geräte", + "confirm_delete": "Möchten Sie dieses Gerät wirklich löschen?", "confirm_rename_entity_ids": "Möchten Sie auch die Entitäts-IDs Ihrer Entitäten umbenennen?", "data_table": { "area": "Bereich", @@ -1320,6 +1321,7 @@ "model": "Modell", "no_devices": "keine Geräte" }, + "delete": "Löschen", "description": "Verwalte verbundene Geräte", "details": "Hier sind alle Details deines Geräts.", "device_not_found": "Gerät nicht gefunden.", @@ -1469,6 +1471,7 @@ }, "failed_create_area": "Der Bereich konnte nicht erstellt werden.", "finish": "Fertig", + "loading_first_time": "Bitte warten Sie, während die Integration installiert wird", "name_new_area": "Name des neuen Bereichs?", "not_all_required_fields": "Nicht alle Pflichtfelder sind ausgefüllt.", "submit": "Absenden" @@ -1524,7 +1527,7 @@ "title_required": "Titel ist erforderlich.", "update": "Aktualisieren", "url": "Url", - "url_error_msg": "Die URL darf keine Leerzeichen oder Sonderzeichen enthalten, außer _ und -" + "url_error_msg": "Die URL sollte ein - enthalten und darf keine Leerzeichen oder Sonderzeichen enthalten, außer _ und -" }, "picker": { "add_dashboard": "Dashboard hinzufügen", @@ -2252,6 +2255,7 @@ "edit_card": { "add": "Karte hinzufügen", "delete": "Löschen", + "duplicate": "Karte duplizieren", "edit": "Bearbeiten", "header": "Kartenkonfiguration", "move": "Zur Ansicht Bewegen", diff --git a/translations/en.json b/translations/en.json index c41bec6b75..153c990ef2 100644 --- a/translations/en.json +++ b/translations/en.json @@ -664,7 +664,7 @@ "min": "Minimum value", "mode": "Display mode", "slider": "Slider", - "step": "Step size of the slider", + "step": "Step size", "unit_of_measurement": "Unit of measurement" }, "input_select": { @@ -2333,7 +2333,8 @@ "view": { "panel_mode": { "description": "This renders the first card at full width; other cards in this view will not be rendered.", - "title": "Panel Mode?" + "title": "Panel Mode?", + "warning_multiple_cards": "This view contains more than one card, but a panel view can only show 1 card." } } }, diff --git a/translations/es.json b/translations/es.json index 2ddc4ae8aa..9cb61d6f78 100644 --- a/translations/es.json +++ b/translations/es.json @@ -621,7 +621,7 @@ "dismiss": "Descartar", "editor": { "confirm_delete": "¿Estás seguro de que quieres eliminar este elemento?", - "delete": "ELIMINAR", + "delete": "Eliminar", "enabled_cause": "Desactivado por {cause}.", "enabled_description": "Las entidades deshabilitadas no se agregarán a Home Assistant.", "enabled_label": "Activar entidad", @@ -631,7 +631,7 @@ "name": "Cambio de nombre", "note": "Nota: puede que esto no funcione todavía con todas las integraciones", "unavailable": "Esta entidad no está disponible actualmente.", - "update": "ACTUALIZAR" + "update": "Actualizar" }, "no_unique_id": "Esta entidad no tiene una ID única, por lo que su configuración no se puede administrar desde la IU.", "related": "Relacionado", @@ -683,7 +683,7 @@ }, "not_editable": "No editable", "not_editable_text": "Esta entidad no se puede cambiar desde la interfaz de usuario porque está definida en configuration.yaml.", - "platform_not_loaded": "La integración {platform} no está cargada, por favor añádela a tu configuración. Ya sea agregando \"default_config:\" o \"{platform}:\".", + "platform_not_loaded": "La integración {platform} no se ha cargado. Por favor añádela a tu configuración, ya sea agregando 'default_config:' o '{platform}:'.", "required_error_msg": "Este campo es obligatorio", "yaml_not_editable": "La configuración de esta entidad no se puede editar desde la IU. Solo las entidades configuradas desde la IU se pueden configurar desde la IU" }, @@ -816,14 +816,14 @@ }, "description": "Visión general de todas las áreas de tu casa.", "editor": { - "create": "CREAR", + "create": "Crear", "default_name": "Área Nueva", - "delete": "ELIMINAR", - "update": "ACTUALIZAR" + "delete": "Eliminar", + "update": "Actualizar" }, "no_areas": "¡Parece que aún no tienes áreas!", "picker": { - "create_area": "CREAR ÁREA", + "create_area": "Crear área", "header": "Áreas", "integrations_page": "Integraciones", "introduction": "Las áreas se utilizan para organizar dónde están los dispositivos. Esta información se utilizará en todo Home Assistant para ayudarte a organizar tu interfaz, permisos e integraciones con otros sistemas.", @@ -1310,6 +1310,7 @@ "automations": "Automatizaciones", "cant_edit": "Solo puedes editar los elementos que se crean en la interfaz de usuario.", "caption": "Dispositivos", + "confirm_delete": "¿Estás seguro de que quieres eliminar este dispositivo?", "confirm_rename_entity_ids": "¿También quieres cambiar el nombre de los identificadores de entidad de tus entidades?", "data_table": { "area": "Área", @@ -1320,6 +1321,7 @@ "model": "Modelo", "no_devices": "Sin dispositivos" }, + "delete": "Eliminar", "description": "Administrar dispositivos conectados", "details": "Aquí están todos los detalles de tu dispositivo.", "device_not_found": "Dispositivo no encontrado.", @@ -1469,6 +1471,7 @@ }, "failed_create_area": "No se pudo crear el área.", "finish": "Terminar", + "loading_first_time": "Por favor, espera mientras la integración está siendo instalada", "name_new_area": "¿Nombre de la nueva área?", "not_all_required_fields": "No se han completado todos los campos requeridos.", "submit": "Enviar" @@ -1524,7 +1527,7 @@ "title_required": "Se requiere un título.", "update": "Actualizar", "url": "Url", - "url_error_msg": "La url no puede contener espacios o caracteres especiales, excepto _ y -" + "url_error_msg": "La URL debe contener un guión (-) y no puede contener espacios o caracteres especiales, excepto _ y -" }, "picker": { "add_dashboard": "Añadir panel de control", @@ -2156,6 +2159,7 @@ "maximum": "Máximo", "minimum": "Mínimo", "name": "Nombre", + "no_theme": "Sin tema", "refresh_interval": "Intervalo de actualización", "show_icon": "¿Mostrar icono?", "show_name": "¿Mostrar nombre?", @@ -2252,6 +2256,7 @@ "edit_card": { "add": "Añadir tarjeta", "delete": "Eliminar tarjeta", + "duplicate": "Duplicar", "edit": "Editar", "header": "Configuración de la tarjeta", "move": "Mover a la vista", diff --git a/translations/fr.json b/translations/fr.json index 4d0dd4565d..d0674838e4 100644 --- a/translations/fr.json +++ b/translations/fr.json @@ -1310,6 +1310,7 @@ "automations": "Automations", "cant_edit": "Vous ne pouvez modifier que les éléments créés dans l'interface utilisateur.", "caption": "Appareils", + "confirm_delete": "Voulez-vous vraiment supprimer cet appareil ?", "confirm_rename_entity_ids": "Voulez-vous aussi renommer les ID de vos entités?", "data_table": { "area": "Zone", @@ -1320,6 +1321,7 @@ "model": "Modèle", "no_devices": "Aucun appareil" }, + "delete": "Supprimer", "description": "Gérer les appareils connectés", "details": "Voici tous les détails de votre appareil.", "device_not_found": "Appareil non trouvé.", @@ -2157,6 +2159,7 @@ "maximum": "Maximum", "minimum": "Minimum", "name": "Nom", + "no_theme": "Pas de thème", "refresh_interval": "Intervalle de rafraîchissement", "show_icon": "Afficher l'icône ?", "show_name": "Afficher le nom ?", diff --git a/translations/ko.json b/translations/ko.json index 877c7d1563..5ea268cbde 100644 --- a/translations/ko.json +++ b/translations/ko.json @@ -1310,6 +1310,7 @@ "automations": "자동화", "cant_edit": "UI 에서 작성된 항목만 편집할 수 있습니다.", "caption": "기기", + "confirm_delete": "이 기기를 삭제하시겠습니까?", "confirm_rename_entity_ids": "구성요소의 ID 이름 또한 바꾸시겠습니까?", "data_table": { "area": "영역", @@ -1320,6 +1321,7 @@ "model": "모델", "no_devices": "기기 없음" }, + "delete": "삭제", "description": "연결된 기기를 관리합니다", "details": "기기의 모든 세부 정보는 다음과 같습니다.", "device_not_found": "기기를 찾을 수 없습니다.", @@ -2157,6 +2159,7 @@ "maximum": "최대", "minimum": "최소", "name": "이름", + "no_theme": "테마 없음", "refresh_interval": "새로 고침 간격", "show_icon": "아이콘 표시", "show_name": "이름 표시", diff --git a/translations/ru.json b/translations/ru.json index 31455be037..cd37f34c57 100644 --- a/translations/ru.json +++ b/translations/ru.json @@ -621,7 +621,7 @@ "dismiss": "Отклонить", "editor": { "confirm_delete": "Вы уверены, что хотите удалить эту запись?", - "delete": "УДАЛИТЬ", + "delete": "Удалить", "enabled_cause": "Отключено из-за {cause}.", "enabled_description": "Отключенные объекты не будут доступны в Home Assistant.", "enabled_label": "Включить объект", @@ -630,7 +630,7 @@ "name": "Название", "note": "(может работать не со всеми интеграциями)", "unavailable": "Этот объект в настоящее время недоступен.", - "update": "ОБНОВИТЬ" + "update": "Обновить" }, "no_unique_id": "У этого объекта нет уникального идентификатора, поэтому его настройками нельзя управлять из пользовательского интерфейса.", "related": "Зависимости", @@ -815,14 +815,14 @@ }, "description": "Управляйте помещениями в Вашем доме", "editor": { - "create": "ДОБАВИТЬ", + "create": "Добавить", "default_name": "Новое помещение", - "delete": "УДАЛИТЬ", - "update": "ОБНОВИТЬ" + "delete": "Удалить", + "update": "Обновить" }, "no_areas": "У Вас еще нет добавленных помещений.", "picker": { - "create_area": "ДОБАВИТЬ", + "create_area": "Добавить помещение", "header": "Помещения", "integrations_page": "Страница интеграций", "introduction": "Этот раздел используется для определения местоположения устройств. Данная информация будет использоваться в Home Assistant, чтобы помочь вам в организации вашего интерфейса, определении прав доступа и интеграции с другими системами.", @@ -1309,6 +1309,7 @@ "automations": "Автоматизация", "cant_edit": "Вы можете редактировать только созданные в пользовательском интерфейсе элементы.", "caption": "Устройства", + "confirm_delete": "Вы уверены, что хотите удалить это устройство?", "confirm_rename_entity_ids": "Хотите ли Вы также переименовать идентификаторы объектов?", "data_table": { "area": "Помещение", @@ -1319,6 +1320,7 @@ "model": "Модель", "no_devices": "Нет устройств" }, + "delete": "Удалить", "description": "Управляйте подключенными устройствами", "details": "Здесь приведена вся доступная информация об этом устройстве.", "device_not_found": "Устройство не найдено.", @@ -2149,6 +2151,7 @@ "maximum": "Максимум", "minimum": "Минимум", "name": "Название", + "no_theme": "Нет темы", "refresh_interval": "Интервал обновления", "show_icon": "Значок", "show_name": "Название", diff --git a/translations/zh-Hans.json b/translations/zh-Hans.json index 9a1f302020..f6e247e92e 100644 --- a/translations/zh-Hans.json +++ b/translations/zh-Hans.json @@ -1310,6 +1310,7 @@ "automations": "自动化", "cant_edit": "您只能编辑在 UI 中创建的项目。", "caption": "设备", + "confirm_delete": "您确定要删除此设备吗?", "confirm_rename_entity_ids": "是否要重命名实体的实体 ID?", "data_table": { "area": "区域", @@ -1320,6 +1321,7 @@ "model": "型号", "no_devices": "没有设备" }, + "delete": "删除", "description": "管理已连接的设备", "details": "这是设备的所有详细信息。", "device_not_found": "未找到设备。", @@ -2157,6 +2159,7 @@ "maximum": "最大值", "minimum": "最小值", "name": "名称", + "no_theme": "没有主题", "refresh_interval": "刷新间隔", "show_icon": "显示图标?", "show_name": "显示名称?", diff --git a/translations/zh-Hant.json b/translations/zh-Hant.json index 1ac871e85d..296f22a4dd 100644 --- a/translations/zh-Hant.json +++ b/translations/zh-Hant.json @@ -1310,6 +1310,7 @@ "automations": "自動化", "cant_edit": "只能編輯於 UI 中新增的物件。", "caption": "設備", + "confirm_delete": "確定要刪除此設備?", "confirm_rename_entity_ids": "是否也要變更物件的物件 ID?", "data_table": { "area": "分區", @@ -1320,6 +1321,7 @@ "model": "型號", "no_devices": "沒有設備" }, + "delete": "刪除", "description": "管理已連線設備", "details": "此處顯示設備所有詳細資訊。", "device_not_found": "未找到設備。", @@ -2157,6 +2159,7 @@ "maximum": "最大值", "minimum": "最小值", "name": "名稱", + "no_theme": "沒有主題", "refresh_interval": "更新間隔", "show_icon": "顯示圖示?", "show_name": "顯示名稱?", From c894bc2e40ca1969ad35806b25d5854b1db8c981 Mon Sep 17 00:00:00 2001 From: Aidan Timson Date: Sun, 22 Mar 2020 23:18:13 +0000 Subject: [PATCH 34/66] Fix icon button padding (#5312) --- src/components/entity/ha-entity-picker.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/entity/ha-entity-picker.ts b/src/components/entity/ha-entity-picker.ts index 189d3daa9a..d2ddd62165 100644 --- a/src/components/entity/ha-entity-picker.ts +++ b/src/components/entity/ha-entity-picker.ts @@ -246,7 +246,7 @@ class HaEntityPicker extends LitElement { paper-input > paper-icon-button { width: 24px; height: 24px; - padding: 2px; + padding: 0px 2px; color: var(--secondary-text-color); } [hidden] { From 40c94b6596f416da10561ed37279e20106e189b0 Mon Sep 17 00:00:00 2001 From: HomeAssistant Azure Date: Mon, 23 Mar 2020 00:32:58 +0000 Subject: [PATCH 35/66] [ci skip] Translation update --- translations/ca.json | 3 +- translations/da.json | 5 +- translations/fr.json | 3 +- translations/ko.json | 5 +- translations/nb.json | 20 +++++--- translations/pl.json | 8 ++- translations/ru.json | 3 +- translations/sk.json | 92 ++++++++++++++++++++++++++++++++-- translations/tr.json | 102 ++++++++++++++++++++++++++++++++++---- translations/zh-Hans.json | 3 +- translations/zh-Hant.json | 21 ++++---- 11 files changed, 226 insertions(+), 39 deletions(-) diff --git a/translations/ca.json b/translations/ca.json index 82f4285a0c..88422bc0a7 100644 --- a/translations/ca.json +++ b/translations/ca.json @@ -2333,7 +2333,8 @@ "view": { "panel_mode": { "description": "Es renderitzarà la primera targeta a amplada completa; les altres targetes d'aquesta visualització no es mostraran.", - "title": "Mode panell?" + "title": "Mode panell?", + "warning_multiple_cards": "Aquesta vista conté més d'una targeta, però una vista en mode panell només pot mostrar una targeta." } } }, diff --git a/translations/da.json b/translations/da.json index ac4cc152e6..b5483529da 100644 --- a/translations/da.json +++ b/translations/da.json @@ -664,7 +664,7 @@ "min": "Minimumsværdi", "mode": "Visningstilstand", "slider": "Skyder", - "step": "Skyderens trinstørrelse", + "step": "Trinstørrelse", "unit_of_measurement": "Måleenhed" }, "input_select": { @@ -2333,7 +2333,8 @@ "view": { "panel_mode": { "description": "Dette gengiver første kort i fuld bredde; andre kort i denne visning vil ikke blive gengivet.", - "title": "Paneltilstand?" + "title": "Paneltilstand?", + "warning_multiple_cards": "Denne visning indeholder mere end ét kort, men en panelvisning kan kun vise 1 kort." } } }, diff --git a/translations/fr.json b/translations/fr.json index d0674838e4..e48a610fd4 100644 --- a/translations/fr.json +++ b/translations/fr.json @@ -2333,7 +2333,8 @@ "view": { "panel_mode": { "description": "Cela affiche la première carte en pleine largeur; les autres cartes de cette vue ne seront pas affichées.", - "title": "Mode panneau?" + "title": "Mode panneau?", + "warning_multiple_cards": "Cette vue contient plusieurs carte, mais un panneau d'affichage ne peut montrer que 1 carte." } } }, diff --git a/translations/ko.json b/translations/ko.json index 5ea268cbde..1aa3a40378 100644 --- a/translations/ko.json +++ b/translations/ko.json @@ -664,7 +664,7 @@ "min": "최소값", "mode": "디스플레이 모드", "slider": "슬라이더", - "step": "슬라이더의 간격 크기", + "step": "슬라이더 간격", "unit_of_measurement": "측정 단위" }, "input_select": { @@ -2333,7 +2333,8 @@ "view": { "panel_mode": { "description": "패널 모드는 첫 번째 카드를 전체 너비로 보여줍니다. 이 뷰에서는 다른 카드는 보여지지 않습니다.", - "title": "패널 모드" + "title": "패널 모드", + "warning_multiple_cards": "이 뷰에는 카드가 두 개 이상 포함되어 있지만 패널 모드는 한 개의 카드만 표시될 수 있습니다." } } }, diff --git a/translations/nb.json b/translations/nb.json index 281d13f544..a1fb200206 100644 --- a/translations/nb.json +++ b/translations/nb.json @@ -621,7 +621,7 @@ "dismiss": "Avvis", "editor": { "confirm_delete": "Er du sikker på at du vil slette denne oppføringen?", - "delete": "SLETT", + "delete": "Slett", "enabled_cause": "Deaktivert av {cause}.", "enabled_description": "Deaktiverte entiteter vil ikke bli lagt til i Home Assistant.", "enabled_label": "Aktiver entitet", @@ -631,7 +631,7 @@ "name": "Overstyr Navn", "note": "Merk: dette fungerer kanskje ikke ennå med alle integrasjoner.", "unavailable": "Denne entiteten er ikke tilgjengelig for øyeblikket.", - "update": "OPPDATÉR" + "update": "Oppdater" }, "no_unique_id": "Denne enheten har ikke en unik ID, derfor kan innstillingene ikke administreres fra brukergrensesnittet.", "related": "Relaterte", @@ -664,7 +664,7 @@ "min": "Minimum verdi", "mode": "Visningsmodus", "slider": "Glidebryter", - "step": "Trinnstørrelse på glidebryteren", + "step": "Trinnstørrelse", "unit_of_measurement": "Måleenhet" }, "input_select": { @@ -816,14 +816,14 @@ }, "description": "Oversikt over alle områder i ditt hjem", "editor": { - "create": "OPPRETT", + "create": "Opprett", "default_name": "Nytt område", - "delete": "SLETT", - "update": "OPPDATER" + "delete": "Slett", + "update": "Oppdater" }, "no_areas": "Det ser ikke ut som om du har noen områder ennå!", "picker": { - "create_area": "OPPRETT OMRÅDE", + "create_area": "Opprett område", "header": "Områder", "integrations_page": "Integrasjonsside", "introduction": "Områder brukes til å organisere hvor enheter er. Denne informasjonen vil bli brukt gjennomgående i Home Assistant for å hjelpe deg med å organisere grensesnittet, tillatelser og integrasjoner med andre systemer.", @@ -1310,6 +1310,7 @@ "automations": "Automasjoner", "cant_edit": "Du kan bare redigere elementer som er opprettet i UI.", "caption": "Enheter", + "confirm_delete": "Er du sikker på at du vil slette denne enheten?", "confirm_rename_entity_ids": "Vil du også endre navn på entitets-ID-en for entitetene dine?", "data_table": { "area": "Område", @@ -1320,6 +1321,7 @@ "model": "Modell", "no_devices": "Ingen enheter" }, + "delete": "Slett", "description": "Administrer tilkoblede enheter", "details": "Her er alle detaljer for enheten.", "device_not_found": "Enhet ikke funnet", @@ -2157,6 +2159,7 @@ "maximum": "Maksimalt", "minimum": "Minimum", "name": "Navn", + "no_theme": "Ingen tema", "refresh_interval": "Oppdateringsintervall", "show_icon": "Vis ikon?", "show_name": "Vis navn?", @@ -2330,7 +2333,8 @@ "view": { "panel_mode": { "description": "Dette gjengir det første kortet i full bredde; andre kort i denne visningen vil ikke bli gitt.", - "title": "Panel modus?" + "title": "Panel modus?", + "warning_multiple_cards": "Denne visningen inneholder mer enn ett kort, men en panelvisning kan bare vise 1 kort." } } }, diff --git a/translations/pl.json b/translations/pl.json index 84ebd1cfac..7ec9ff85b9 100644 --- a/translations/pl.json +++ b/translations/pl.json @@ -1310,6 +1310,7 @@ "automations": "Automatyzacje", "cant_edit": "Możesz edytować tylko elementy utworzone w interfejsie użytkownika.", "caption": "Urządzenia", + "confirm_delete": "Na pewno chcesz usunąć to urządzenie?", "confirm_rename_entity_ids": "Czy chcesz także zmienić identyfikatory encji?", "data_table": { "area": "Obszar", @@ -1320,6 +1321,7 @@ "model": "Model", "no_devices": "Brak urządzeń" }, + "delete": "Usuń", "description": "Zarządzaj podłączonymi urządzeniami", "details": "Oto wszystkie szczegóły dotyczące twojego urządzenia.", "device_not_found": "Urządzenie nie zostało znalezione.", @@ -1469,6 +1471,7 @@ }, "failed_create_area": "Nie udało się utworzyć obszaru.", "finish": "Zakończ", + "loading_first_time": "Proszę czekać, trwa instalowanie integracji...", "name_new_area": "Nazwa nowego obszaru?", "not_all_required_fields": "Nie wszystkie wymagane pola są wypełnione.", "submit": "Zatwierdź" @@ -2156,6 +2159,7 @@ "maximum": "Maksimum", "minimum": "Minimum", "name": "Nazwa", + "no_theme": "Bez motywu", "refresh_interval": "Częstotliwość odświeżania", "show_icon": "Wyświetlanie ikony", "show_name": "Wyświetlanie nazwy", @@ -2252,6 +2256,7 @@ "edit_card": { "add": "Dodaj kartę", "delete": "Usuń", + "duplicate": "Duplikuj kartę", "edit": "Edytuj", "header": "Konfiguracja karty", "move": "Przenieś", @@ -2328,7 +2333,8 @@ "view": { "panel_mode": { "description": "Pierwsza karta renderowana jest w pełnej szerokości; inne karty w tym widoku nie będą renderowane.", - "title": "Tryb panelu?" + "title": "Tryb panelu?", + "warning_multiple_cards": "Ten widok zawiera więcej niż jedną kartę, a widok panelu może wyświetlać tylko jedną kartę." } } }, diff --git a/translations/ru.json b/translations/ru.json index cd37f34c57..5f69ea77b9 100644 --- a/translations/ru.json +++ b/translations/ru.json @@ -2324,7 +2324,8 @@ "view": { "panel_mode": { "description": "Первая карточка будет растянута на всю ширину. Другие карточки не будут отображаться на этой вкладке", - "title": "Режим панели" + "title": "Режим панели", + "warning_multiple_cards": "На этой вкладке несколько карточек. В режиме панели может отображаться только одна карточка." } } }, diff --git a/translations/sk.json b/translations/sk.json index 2da031737a..77ca5dcb1c 100644 --- a/translations/sk.json +++ b/translations/sk.json @@ -1226,9 +1226,28 @@ }, "header": "Konfigurovať Home Assistant", "helpers": { + "caption": "Pomocníci", "description": "Prvky, ktoré môžu pomôcť pri vytváraní automatizácií.", "dialog": { + "add_helper": "Pridať pomocníka", + "add_platform": "Pridať {platform}", "create": "Vytvoriť" + }, + "picker": { + "add_helper": "Pridať pomocníka", + "headers": { + "editable": "Editovateľné", + "entity_id": "Entity ID", + "name": "Názov", + "type": "Typ" + } + }, + "types": { + "input_boolean": "Prepínač", + "input_datetime": "Dátum a/alebo čas", + "input_number": "Číslo", + "input_select": "Rozbaľovací zoznam", + "input_text": "Text" } }, "integrations": { @@ -1280,20 +1299,79 @@ }, "introduction": "Tu je možné konfigurovať vaše komponenty a Home Assistant. Aktuálne sa z používateľského rozhrania nedá konfigurovať všetko, ale pracujeme na tom.", "lovelace": { + "caption": "Lovelace dashboardy", "dashboards": { + "cant_edit_default": "Štandardný dashboard Lovelace nie je možné upravovať z používateľského rozhrania. Môžete ho skryť nastavením iného dashboardu ako predvoleného nastavenia.", + "cant_edit_yaml": "Dashboardy definované v YAML nie je možné upravovať z používateľského rozhrania. Zmeňte ich v súbore configuration.yaml.", + "caption": "Dashboardy", + "conf_mode": { + "storage": "Ovládané cez UI", + "yaml": "Súbor YAML" + }, "confirm_delete": "Naozaj chcete odstrániť tento dashboard?", + "default_dashboard": "Toto je predvolený dashboard", "detail": { + "create": "Vytvoriť", "delete": "Vymazať", - "update": "Aktualizovať" + "dismiss": "Zavrieť", + "edit_dashboard": "Upraviť dashboard", + "icon": "Ikona", + "new_dashboard": "Pridať nový dashboard", + "remove_default": "Odstrániť ako predvolené na tomto zariadení", + "require_admin": "Len pre správcov", + "set_default": "Nastaviť ako predvolené na tomto zariadení", + "show_sidebar": "Zobraziť v bočnom paneli", + "title": "Názov", + "title_required": "Názov je povinný.", + "update": "Aktualizovať", + "url": "Url", + "url_error_msg": "Adresa URL by mala obsahovať znak - a nemôže obsahovať medzery ani špeciálne znaky, s výnimkou písmen _ a -" }, "picker": { + "add_dashboard": "Pridať dashboard", + "headers": { + "conf_mode": "Metóda konfigurácie", + "default": "Predvolený", + "filename": "Názov súboru", + "require_admin": "Len pre správcov", + "sidebar": "Zobraziť v bočnom paneli", + "title": "Názov" + }, "open": "Otvoriť" } }, + "description": "Nakonfigurujte si svoje Lovelace dashboardy", "resources": { + "cant_edit_yaml": "Používate Lovelace v režime YAML, preto nemôžete spravovať svoje prostriedky cez používateľské rozhranie. Spravujte ich v configuration.yaml.", + "caption": "Prostriedky", + "confirm_delete": "Naozaj chcete odstrániť tento prostriedok?", "detail": { + "create": "Vytvoriť", "delete": "Vymazať", - "update": "Aktualizovať" + "dismiss": "Zavrieť", + "new_resource": "Pridajte nový prostriedok", + "type": "Typ prostriedku", + "update": "Aktualizovať", + "url": "Url", + "url_error_msg": "Adresa URL je povinné pole", + "warning_header": "Buďte opatrní!", + "warning_text": "Pridávanie prostriedkov môže byť nebezpečné, uistite sa, že poznáte zdroj prostriedku a že mu dôverujete. Zlé prostriedky môžu vážne poškodiť váš systém." + }, + "picker": { + "add_resource": "Pridať prostriedok", + "headers": { + "type": "Typ", + "url": "Url" + }, + "no_resources": "Žiadne prostriedky" + }, + "refresh_body": "Ak chcete dokončiť odstránenie, musíte stránku aktualizovať. Chcete ju teraz obnoviť?", + "refresh_header": "Chcete obnoviť?", + "types": { + "css": "Stylesheet", + "html": "HTML (zastarané)", + "js": "JavaScript súbor (zastarané)", + "module": "JavaScript modul" } } }, @@ -1856,6 +1934,7 @@ "error_remove": "Nepodarilo sa odstrániť konfiguráciu: {chyby}", "error_save_yaml": "Nepodarilo sa uložiť YAML: {error}", "header": "Upraviť konfiguráciu", + "resources_moved": "Prostriedky by už nemali byť pridané do konfigurácie Lovelace, ale môžu byť pridané v konfiguračnom paneli Lovelace.", "save": "Uložiť", "saved": "Uložené", "unsaved_changes": "Neuložené zmeny" @@ -1866,7 +1945,9 @@ "header": "Prevziať kontrolu rozhrania Lovelace", "para": "Štandardne bude Home Assistant udržiavať vaše používateľské rozhranie a aktualizovať ho, keď budú k dispozícii nové entity alebo komponenty rozhrania Lovelace. Ak prevezmete kontrolu, už za vás nebudeme automaticky robiť zmeny.", "para_sure": "Skutočne chcete prevziať kontrolu vášho používateľského rozhrania?", - "save": "Prevziať kontrolu" + "save": "Prevziať kontrolu", + "yaml_config": "Na začiatok vám pomôžeme so súčasnou konfiguráciou tohto dashboardu:", + "yaml_control": "Ak chcete prevziať kontrolu v režime YAML, vytvorte súbor YAML s názvom, ktorý ste uviedli vo svojej konfigurácii pre tento dashboard alebo predvolený súbor 'ui-lovelace.yaml'." }, "suggest_card": { "add": "Pridať do používateľského rozhrania Lovelace", @@ -1883,9 +1964,14 @@ "configure_ui": "Konfigurovať používateľské rozhranie", "help": "Pomoc", "refresh": "Obnoviť", + "reload_resources": "Znovu načítať prostriedky", "unused_entities": "Nepoužité entity" }, "reload_lovelace": "Znovu načítať Lovelace", + "reload_resources": { + "refresh_body": "Ak chcete dokončiť načítanie, musíte stránku obnoviť. Chcete ju teraz obnoviť?", + "refresh_header": "Chcete obnoviť?" + }, "views": { "confirm_delete": "Naozaj chcete odstrániť toto zobrazenie?", "confirm_delete_existing_cards_text": "Naozaj chcete odstrániť zobrazenie '{name}'? Toto zobrazenie obsahuje {number} kariet, ktoré budú odstránené. Túto akciu nie je možné vrátiť späť.", diff --git a/translations/tr.json b/translations/tr.json index 5dff3fc503..b2825bd1b5 100644 --- a/translations/tr.json +++ b/translations/tr.json @@ -623,6 +623,7 @@ "enabled_description": "Devre dışı bırakılan varlıklar Home Assistant'a eklenmeyecek.", "enabled_label": "Varlığı etkinleştir", "entity_id": "Varlık kimliği", + "icon": "Simge geçersiz kılma", "name": "Ad Geçersiz Kılma", "note": "Not: bu henüz tüm entegrasyonlarla çalışmayabilir.", "unavailable": "Bu varlık şu anda kullanılamıyor.", @@ -633,6 +634,7 @@ }, "generic": { "cancel": "İptal", + "close": "kapat", "default_confirmation_title": "Emin misin?", "ok": "Tamam" }, @@ -643,8 +645,12 @@ "name": "Ad" }, "input_datetime": { + "date": "Tarih", + "datetime": "Tarih ve zaman", "has_date": "Tarih", - "has_time": "Zaman" + "has_time": "Zaman", + "mode": "Ne girmek istiyorsunuz", + "time": "Zaman" }, "input_number": { "box": "Giriş alanı", @@ -655,7 +661,16 @@ "step": "Kaydırıcının adım boyutu", "unit_of_measurement": "Ölçü birimi" }, + "input_select": { + "add": "Ekle", + "add_option": "Seçenek ekle", + "no_options": "Henüz bir seçenek yok.", + "options": "Seçenekler" + }, "input_text": { + "max": "Maksimum uzunluk", + "min": "Minimum uzunluk", + "mode": "Görüntü modu", "password": "Şifre", "text": "Metin" }, @@ -1039,6 +1054,7 @@ "enable": "Etkinleştir", "enable_ha_skill": "Home Assistant Alexa yeteneğini etkinleştir", "enable_state_reporting": "Durum Raporlamasını Etkinleştir", + "info": "Home Assistant Cloud için Alexa entegrasyonu ile, tüm Home Assistant cihazlarınızı herhangi bir Alexa özellikli cihaz üzerinden kontrol edebilirsiniz.", "info_state_reporting": "Durum raporlamayı etkinleştirirseniz, Home Assistant sergilenmis varlıkların tüm durum değişikliklerini Amazon'a gönderir. Bu, Alexa uygulamasında her zaman en son durumları görmenizi ve rutin oluşturmak için durum değişikliklerini kullanmanızı sağlar.", "manage_entities": "Varlıkları Yönetin", "sync_entities": "Varlıkları Senkronize Et", @@ -1055,6 +1071,7 @@ "enable_state_reporting": "Durum Raporlamasını Etkinleştir", "enter_pin_error": "PIN kaydedilemiyor:", "enter_pin_hint": "Güvenlik cihazlarını kullanmak için bir PIN girin", + "info": "Home Assistant Cloud için Google Assistant entegrasyonu ile, tüm Home Assistant cihazlarınızı herhangi bir Google Asistan özellikli cihaz üzerinden kontrol edebilirsiniz.", "info_state_reporting": "Durum raporlamayı etkinleştirirseniz, Home Assistant sergilenmis varlıkların tüm durum değişikliklerini Google'e gönderir. Bu, Google Home uygulamasında her zaman en son durumları görmenizi ve rutin oluşturmak için durum değişikliklerini kullanmanızı sağlar.", "manage_entities": "Varlıkları Yönetin", "security_devices": "Güvenlik Cihazları", @@ -1069,6 +1086,7 @@ "not_connected": "Bağlı değil", "remote": { "certificate_info": "Sertifika bilgileri", + "info": "Home Assistant Cloud, evinizden uzakta olduğunuzda örneğinize güvenli bir uzaktan bağlantı sağlar.", "link_learn_how_it_works": "Nasıl çalıştığını öğrenin", "title": "Uzaktan kulanim" }, @@ -1137,6 +1155,7 @@ "email_error_msg": "Geçersiz e-posta", "forgot_password": "Parolanızı mı unuttunuz?", "introduction2": "Bu hizmet ortağımız tarafından yürütülüyor", + "introduction3": "Home Assistant Cloud, bir aylık ücretsiz deneme sürümüne sahip bir abonelik hizmetidir. Ödeme bilgisi gerekmez.", "learn_more_link": "Home Assistant Cloud hakkında daha fazla bilgi edin", "password": "Parola", "password_error_msg": "Parolalar en az 8 karakterdir", @@ -1251,14 +1270,17 @@ "automations": "Otomasyonlar", "cant_edit": "Yalnızca kullanıcı arayüzünde oluşturulan öğeleri düzenleyebilirsiniz.", "caption": "Cihazlar", + "confirm_delete": "Bu cihazı silmek istediğinizden emin misiniz?", "data_table": { "area": "Alan", "battery": "Pil", "device": "Cihaz", "integration": "Entegrasyon", "manufacturer": "Üretici", - "model": "Model" + "model": "Model", + "no_devices": "Cihaz yok" }, + "delete": "Sil", "description": "Bağlı cihazları yönet", "details": "Cihazınızın tüm detayları.", "device_not_found": "Cihaz bulunamadı.", @@ -1344,10 +1366,28 @@ }, "header": "Home Assistant'ı yapılandır", "helpers": { + "caption": "Yardımcılar", + "description": "Otomasyon oluşturmaya yardımcı olabilecek öğeler.", + "dialog": { + "add_helper": "Yardımcı ekle", + "add_platform": "{platform} ekle", + "create": "Oluştur" + }, "picker": { + "add_helper": "Yardımcı ekle", "headers": { - "entity_id": "Varlık kimliği" + "editable": "Düzenlenebilir", + "entity_id": "Varlık kimliği", + "name": "Ad", + "type": "Tip" } + }, + "types": { + "input_boolean": "Geçiş", + "input_datetime": "Tarih ve/veya saat", + "input_number": "Numara", + "input_select": "Açılır", + "input_text": "Metin" } }, "integrations": { @@ -1381,6 +1421,7 @@ }, "failed_create_area": "Alan oluşturulamadı.", "finish": "Bitir", + "loading_first_time": "Lütfen entegrasyonun yüklenmesini bekleyin", "name_new_area": "Yeni alanın adı?", "not_all_required_fields": "Gerekli alanların tümü doldurulmamış.", "submit": "Gönder" @@ -1409,19 +1450,48 @@ }, "introduction": "Buradan bileşenlerinizi ve Home Assistant'ınızı yapılandırabilirsiniz. Herşeyi kullanıcı arayüzü ile ayarlamak henüz mümkün değil fakat üzerinde çalışıyoruz", "lovelace": { + "caption": "Lovelace Kontrol Panelleri", "dashboards": { + "cant_edit_default": "Standart Lovelace kontrol paneli kullanıcı arayüzünden düzenlenemez. Varsayılan olarak başka bir kontrol paneli ayarlayarak gizleyebilirsiniz.", + "cant_edit_yaml": "YAML'de tanımlanan kontrol panelleri kullanıcı arayüzünden düzenlenemez. Configuration.yaml dosyasından değiştirin.", + "caption": "Kontrol panelleri", + "conf_mode": { + "storage": "UI kontrollü", + "yaml": "YAML dosyası" + }, + "confirm_delete": "Bu kontrol panelini silmek istediğinizden emin misiniz?", + "default_dashboard": "Bu varsayılan kontrol paneli", "detail": { "create": "Oluştur", + "delete": "Sil", + "dismiss": "Kapat", + "edit_dashboard": "Kontrol paneli düzenle", + "icon": "Simge", + "new_dashboard": "Yeni kontrol paneli ekle", "remove_default": "Bu cihazda varsayılan olarak kaldır", + "require_admin": "Yalnızca yönetici", "set_default": "Bu cihazda varsayılan olarak ayarla", - "title_required": "Başlık gerekli." + "show_sidebar": "Kenar çubuğunda göster", + "title": "Başlık", + "title_required": "Başlık gerekli.", + "update": "Güncelle", + "url": "URL", + "url_error_msg": "URL bir - içermeli ve _ ve - hariç boşluk veya özel karakter içeremez" }, "picker": { + "add_dashboard": "Kontrol paneli ekle", "headers": { - "default": "Varsayılan" - } + "conf_mode": "Yapılandırma yöntemi", + "default": "Varsayılan", + "filename": "Dosya adı", + "require_admin": "Yalnızca yönetici", + "sidebar": "Kenar çubuğunda göster", + "title": "Başlık" + }, + "open": "Açık" } }, + "description": "Lovelace kontrol panellerinizi yapılandırın", "resources": { "detail": { "create": "Oluştur", @@ -1438,7 +1508,8 @@ "headers": { "type": "Tip", "url": "URL" - } + }, + "no_resources": "Kaynak yok" } } }, @@ -1953,6 +2024,7 @@ } }, "generic": { + "aspect_ratio": "En boy oranı", "camera_image": "Kamera Varlığı", "camera_view": "Kamera Görünümü", "entities": "Varlıklar", @@ -1965,6 +2037,7 @@ "maximum": "Maksimum", "minimum": "Minimum", "name": "Adı", + "no_theme": "Tema yok", "refresh_interval": "Yenileme aralığı", "show_icon": "Simgeyi Göster?", "show_name": "Adı göster?", @@ -2040,6 +2113,7 @@ "edit_card": { "add": "Kart Ekle", "delete": "Sil", + "duplicate": "Çift kart", "edit": "Düzenle", "header": "Kart Ayarları", "move": "Görünüme Taşı", @@ -2061,7 +2135,10 @@ "move_left": "Görünümü sola taşı", "move_right": "Görünümü sağa taşı", "tab_settings": "Ayarlar", - "tab_visibility": "Görünürlük" + "tab_visibility": "Görünürlük", + "visibility": { + "select_users": "Gezinmede hangi kullanıcıların bu görünümü görmesi gerektiğini seçin" + } }, "header": "Kullanıcı arayüzünü düzenle", "menu": { @@ -2101,7 +2178,8 @@ }, "view": { "panel_mode": { - "title": "Panel Modu?" + "title": "Panel Modu?", + "warning_multiple_cards": "Bu görünüm birden fazla kart içeriyor, ancak panel görünümü yalnızca 1 kart gösterebilir." } } }, @@ -2111,9 +2189,14 @@ "exit_edit_mode": "UI düzenleme modundan çık", "help": "Yardım", "refresh": "Yenile", + "reload_resources": "Kaynakları yeniden yükle", "unused_entities": "Kullanılmayan varlıklar" }, "reload_lovelace": "Arayüzü yeniden yükle", + "reload_resources": { + "refresh_body": "Yeniden yüklemeyi tamamlamak için sayfayı yenilemeniz gerekiyor, şimdi yenilemek istiyor musunuz?", + "refresh_header": "Yenilemek istiyor musunuz?" + }, "unused_entities": { "available_entities": "Bunlar sizin elinizde olan ama henüz Lovelace UI'nızda olmayan varlıklardır.", "domain": "Alan adı", @@ -2130,6 +2213,7 @@ "confirm_delete_text": "'{name}' görünümünüzü silmek istediğinizden emin misiniz?" }, "warning": { + "attribute_not_found": "Nitelik {attribute} {entity} içinde mevcut değil", "entity_non_numeric": "Varlık sayısal değil: {entity}", "entity_not_found": "Varlık mevcut değil: {entity}" } diff --git a/translations/zh-Hans.json b/translations/zh-Hans.json index f6e247e92e..26acdbb792 100644 --- a/translations/zh-Hans.json +++ b/translations/zh-Hans.json @@ -2333,7 +2333,8 @@ "view": { "panel_mode": { "description": "这将使第一张卡片全屏显示。此视图中的其他卡片将不会呈现。", - "title": "面板模式?" + "title": "面板模式?", + "warning_multiple_cards": "此视图包含多张卡片,但面板视图只能显示一张卡片。" } } }, diff --git a/translations/zh-Hant.json b/translations/zh-Hant.json index 296f22a4dd..d51fcc42e4 100644 --- a/translations/zh-Hant.json +++ b/translations/zh-Hant.json @@ -2277,15 +2277,15 @@ "add": "新增視圖", "delete": "刪除視圖", "edit": "編輯視圖", - "header": "面板設定", - "header_name": "{name}面板設定", + "header": "視圖設定", + "header_name": "{name}視圖設定", "move_left": "向左移動視圖", "move_right": "向右移動視圖", "tab_badges": "圓標圖示", "tab_settings": "設定", "tab_visibility": "顯示選項", "visibility": { - "select_users": "選擇可觀看此面板的使用者" + "select_users": "選擇可觀看此視圖的使用者" } }, "header": "編輯 UI", @@ -2300,8 +2300,8 @@ "para_no_id": "該元件未含 ID,請於「ui-lovelace.yaml」中為該元件新增 ID。" }, "raw_editor": { - "confirm_remove_config_text": "假如移除 Lovelace UI 設定的話,將自動以區域與設備產生 Lovelace UI 面板。", - "confirm_remove_config_title": "確定要移除 Lovelace UI 設定?將依據區域與設備自動產生 Lovelace UI 面板。", + "confirm_remove_config_text": "假如移除 Lovelace UI 設定的話,將自動以區域與設備產生 Lovelace UI 視圖。", + "confirm_remove_config_title": "確定要移除 Lovelace UI 設定?將依據區域與設備自動產生 Lovelace UI 視圖。", "confirm_unsaved_changes": "變更尚未儲存,確定要退出?", "confirm_unsaved_comments": "設定包含命令、將不會被儲存。是否要繼續?", "error_invalid_config": "設定無效:{error}", @@ -2333,7 +2333,8 @@ "view": { "panel_mode": { "description": "將會以全寬度製作第一張面板,視圖中其他面板將不進行呈現。", - "title": "面板模式?" + "title": "面板模式?", + "warning_multiple_cards": "此視圖包含超過一張面板,但面板視圖僅能顯示一張面板。" } } }, @@ -2361,10 +2362,10 @@ "title": "未使用物件" }, "views": { - "confirm_delete": "刪除面板?", - "confirm_delete_existing_cards": "刪除此主面板同時將移除面板。", - "confirm_delete_existing_cards_text": "確定要刪除「{name}」面板?面板內包含 {number} 張面板也同時將被刪除。此動作將無法回復。", - "confirm_delete_text": "確定要刪除「{name}」面板?", + "confirm_delete": "刪除視圖?", + "confirm_delete_existing_cards": "刪除此視圖同時將移除面板。", + "confirm_delete_existing_cards_text": "確定要刪除「{name}」視圖?視圖內包含 {number} 張面板也同時將被刪除。此動作將無法回復。", + "confirm_delete_text": "確定要刪除「{name}」視圖?", "existing_cards": "無法刪除內含面板的視圖,請先移除面板。" }, "warning": { From ce92add096fc946e0961003652f662e81dcd4438 Mon Sep 17 00:00:00 2001 From: Zack Arnett Date: Mon, 23 Mar 2020 09:46:56 -0400 Subject: [PATCH 36/66] Footer/Header: Graph (#5273) * Add Graph as a footerheader option * Move get Coordinates to a new file * await * Comments --- src/data/graph.ts | 1 + .../lovelace/common/graph/coordinates.ts | 109 +++++++++++++++++ .../common/graph/get-history-coordinates.ts | 24 ++++ src/panels/lovelace/common/graph/get-path.ts | 36 ++++++ .../lovelace/components/hui-graph-base.ts | 78 ++++++++++++ .../create-header-footer-element.ts | 1 + .../header-footer/hui-graph-header-footer.ts | 115 ++++++++++++++++++ src/panels/lovelace/header-footer/types.ts | 14 +++ 8 files changed, 378 insertions(+) create mode 100644 src/data/graph.ts create mode 100644 src/panels/lovelace/common/graph/coordinates.ts create mode 100644 src/panels/lovelace/common/graph/get-history-coordinates.ts create mode 100644 src/panels/lovelace/common/graph/get-path.ts create mode 100644 src/panels/lovelace/components/hui-graph-base.ts create mode 100644 src/panels/lovelace/header-footer/hui-graph-header-footer.ts diff --git a/src/data/graph.ts b/src/data/graph.ts new file mode 100644 index 0000000000..72fb0ad4fa --- /dev/null +++ b/src/data/graph.ts @@ -0,0 +1 @@ +export const strokeWidth = 5; diff --git a/src/panels/lovelace/common/graph/coordinates.ts b/src/panels/lovelace/common/graph/coordinates.ts new file mode 100644 index 0000000000..807a2d61d0 --- /dev/null +++ b/src/panels/lovelace/common/graph/coordinates.ts @@ -0,0 +1,109 @@ +import { strokeWidth } from "../../../../data/graph"; + +const average = (items: any[]): number => { + return ( + items.reduce((sum, entry) => sum + parseFloat(entry.state), 0) / + items.length + ); +}; + +const lastValue = (items: any[]): number => { + return parseFloat(items[items.length - 1].state) || 0; +}; + +const calcPoints = ( + history: any, + hours: number, + width: number, + detail: number, + min: number, + max: number +): number[][] => { + const coords = [] as number[][]; + const height = 80; + let yRatio = (max - min) / height; + yRatio = yRatio !== 0 ? yRatio : height; + let xRatio = width / (hours - (detail === 1 ? 1 : 0)); + xRatio = isFinite(xRatio) ? xRatio : width; + + const first = history.filter(Boolean)[0]; + let last = [average(first), lastValue(first)]; + + const getCoords = (item: any[], i: number, offset = 0, depth = 1) => { + if (depth > 1 && item) { + return item.forEach((subItem, index) => + getCoords(subItem, i, index, depth - 1) + ); + } + + const x = xRatio * (i + offset / 6); + + if (item) { + last = [average(item), lastValue(item)]; + } + const y = + height + strokeWidth / 2 - ((item ? last[0] : last[1]) - min) / yRatio; + return coords.push([x, y]); + }; + + for (let i = 0; i < history.length; i += 1) { + getCoords(history[i], i, 0, detail); + } + + if (coords.length === 1) { + coords[1] = [width, coords[0][1]]; + } + + coords.push([width, coords[coords.length - 1][1]]); + return coords; +}; + +export const coordinates = ( + history: any, + hours: number, + width: number, + detail: number +): number[][] | undefined => { + history.forEach((item) => (item.state = Number(item.state))); + history = history.filter((item) => !Number.isNaN(item.state)); + + const min = Math.min.apply( + Math, + history.map((item) => item.state) + ); + const max = Math.max.apply( + Math, + history.map((item) => item.state) + ); + const now = new Date().getTime(); + + const reduce = (res, item, point) => { + const age = now - new Date(item.last_changed).getTime(); + + let key = Math.abs(age / (1000 * 3600) - hours); + if (point) { + key = (key - Math.floor(key)) * 60; + key = Number((Math.round(key / 10) * 10).toString()[0]); + } else { + key = Math.floor(key); + } + if (!res[key]) { + res[key] = []; + } + res[key].push(item); + return res; + }; + + history = history.reduce((res, item) => reduce(res, item, false), []); + if (detail > 1) { + history = history.map((entry) => + entry.reduce((res, item) => reduce(res, item, true), []) + ); + } + + if (!history.length) { + return undefined; + } + + return calcPoints(history, hours, width, detail, min, max); +}; diff --git a/src/panels/lovelace/common/graph/get-history-coordinates.ts b/src/panels/lovelace/common/graph/get-history-coordinates.ts new file mode 100644 index 0000000000..73157df094 --- /dev/null +++ b/src/panels/lovelace/common/graph/get-history-coordinates.ts @@ -0,0 +1,24 @@ +import { fetchRecent } from "../../../../data/history"; +import { coordinates } from "../graph/coordinates"; +import { HomeAssistant } from "../../../../types"; + +export const getHistoryCoordinates = async ( + hass: HomeAssistant, + entity: string, + hours: number, + detail: number +) => { + const endTime = new Date(); + const startTime = new Date(); + startTime.setHours(endTime.getHours() - hours); + + const stateHistory = await fetchRecent(hass, entity, startTime, endTime); + + if (stateHistory.length < 1 || stateHistory[0].length < 1) { + return; + } + + const coords = coordinates(stateHistory[0], hours, 500, detail); + + return coords; +}; diff --git a/src/panels/lovelace/common/graph/get-path.ts b/src/panels/lovelace/common/graph/get-path.ts new file mode 100644 index 0000000000..2c97ed5bc0 --- /dev/null +++ b/src/panels/lovelace/common/graph/get-path.ts @@ -0,0 +1,36 @@ +const midPoint = ( + _Ax: number, + _Ay: number, + _Bx: number, + _By: number +): number[] => { + const _Zx = (_Ax - _Bx) / 2 + _Bx; + const _Zy = (_Ay - _By) / 2 + _By; + return [_Zx, _Zy]; +}; + +export const getPath = (coords: number[][]): string => { + if (!coords.length) { + return ""; + } + + let next: number[]; + let Z: number[]; + const X = 0; + const Y = 1; + let path = ""; + let last = coords.filter(Boolean)[0]; + + path += `M ${last[X]},${last[Y]}`; + + for (const coord of coords) { + next = coord; + Z = midPoint(last[X], last[Y], next[X], next[Y]); + path += ` ${Z[X]},${Z[Y]}`; + path += ` Q${next[X]},${next[Y]}`; + last = next; + } + + path += ` ${next![X]},${next![Y]}`; + return path; +}; diff --git a/src/panels/lovelace/components/hui-graph-base.ts b/src/panels/lovelace/components/hui-graph-base.ts new file mode 100644 index 0000000000..05d3d6a222 --- /dev/null +++ b/src/panels/lovelace/components/hui-graph-base.ts @@ -0,0 +1,78 @@ +import { + html, + LitElement, + TemplateResult, + customElement, + property, + css, + CSSResult, + svg, + PropertyValues, +} from "lit-element"; + +import { strokeWidth } from "../../../data/graph"; +import { getPath } from "../common/graph/get-path"; + +@customElement("hui-graph-base") +export class HuiGraphBase extends LitElement { + @property() public coordinates?: any; + @property() private _path?: string; + + protected render(): TemplateResult { + return html` + ${this._path + ? svg` + + + + + + + + + + + ` + : svg``} + `; + } + + protected updated(changedProps: PropertyValues) { + if (!this.coordinates) { + return; + } + + if (changedProps.has("coordinates")) { + this._path = getPath(this.coordinates); + } + } + + static get styles(): CSSResult { + return css` + :host { + display: flex; + width: 100%; + } + .fill { + opacity: 0.1; + } + `; + } +} + +declare global { + interface HTMLElementTagNameMap { + "hui-graph-base": HuiGraphBase; + } +} diff --git a/src/panels/lovelace/create-element/create-header-footer-element.ts b/src/panels/lovelace/create-element/create-header-footer-element.ts index f2e2859f3c..4ec039f3f8 100644 --- a/src/panels/lovelace/create-element/create-header-footer-element.ts +++ b/src/panels/lovelace/create-element/create-header-footer-element.ts @@ -4,6 +4,7 @@ import { createLovelaceElement } from "./create-element-base"; const LAZY_LOAD_TYPES = { picture: () => import("../header-footer/hui-picture-header-footer"), buttons: () => import("../header-footer/hui-buttons-header-footer"), + graph: () => import("../header-footer/hui-graph-header-footer"), }; export const createHeaderFooterElement = (config: LovelaceHeaderFooterConfig) => diff --git a/src/panels/lovelace/header-footer/hui-graph-header-footer.ts b/src/panels/lovelace/header-footer/hui-graph-header-footer.ts new file mode 100644 index 0000000000..880cb71372 --- /dev/null +++ b/src/panels/lovelace/header-footer/hui-graph-header-footer.ts @@ -0,0 +1,115 @@ +import { + html, + LitElement, + TemplateResult, + customElement, + property, + PropertyValues, + CSSResult, + css, +} from "lit-element"; + +import "../components/hui-graph-base"; + +import { LovelaceHeaderFooter } from "../types"; +import { HomeAssistant } from "../../../types"; +import { GraphHeaderFooterConfig } from "./types"; +import { getHistoryCoordinates } from "../common/graph/get-history-coordinates"; + +const MINUTE = 60000; + +@customElement("hui-graph-header-footer") +export class HuiGraphHeaderFooter extends LitElement + implements LovelaceHeaderFooter { + public static getStubConfig(): object { + return {}; + } + + @property() public hass?: HomeAssistant; + @property() protected _config?: GraphHeaderFooterConfig; + @property() private _coordinates?: any; + private _date?: Date; + + public setConfig(config: GraphHeaderFooterConfig): void { + if (!config?.entity || config.entity.split(".")[0] !== "sensor") { + throw new Error( + "Invalid Configuration: An entity from within the sensor domain required" + ); + } + + const cardConfig = { + detail: 1, + hours_to_show: 24, + ...config, + }; + + cardConfig.hours_to_show = Number(cardConfig.hours_to_show); + cardConfig.detail = + cardConfig.detail === 1 || cardConfig.detail === 2 + ? cardConfig.detail + : 1; + + this._config = cardConfig; + } + + protected render(): TemplateResult { + if (!this._config || !this.hass) { + return html``; + } + + if (!this._coordinates) { + return html` +
+ No state history found. +
+ `; + } + + return html` + + `; + } + + protected firstUpdated(): void { + this._date = new Date(); + } + + protected updated(changedProps: PropertyValues) { + if (!this._config || !this.hass) { + return; + } + + if (changedProps.has("_config")) { + this._getCoordinates(); + } else if (Date.now() - this._date!.getTime() >= MINUTE) { + this._getCoordinates(); + } + } + + private async _getCoordinates(): Promise { + this._coordinates = await getHistoryCoordinates( + this.hass!, + this._config!.entity, + this._config!.hours_to_show!, + this._config!.detail! + ); + + this._date = new Date(); + } + + static get styles(): CSSResult { + return css` + .info { + text-align: center; + line-height: 58px; + color: var(--secondary-text-color); + } + `; + } +} + +declare global { + interface HTMLElementTagNameMap { + "hui-graph-header-footer": HuiGraphHeaderFooter; + } +} diff --git a/src/panels/lovelace/header-footer/types.ts b/src/panels/lovelace/header-footer/types.ts index 78d5d55547..a65c17720c 100644 --- a/src/panels/lovelace/header-footer/types.ts +++ b/src/panels/lovelace/header-footer/types.ts @@ -11,6 +11,12 @@ export interface ButtonsHeaderFooterConfig extends LovelaceHeaderFooterConfig { entities: Array; } +export interface GraphHeaderFooterConfig extends LovelaceHeaderFooterConfig { + entity: string; + detail?: number; + hours_to_show?: number; +} + export interface PictureHeaderFooterConfig extends LovelaceHeaderFooterConfig { image: string; tap_action?: ActionConfig; @@ -31,7 +37,15 @@ export const buttonsHeaderFooterConfigStruct = struct({ entities: [entitiesConfigStruct], }); +export const graphHeaderFooterConfigStruct = struct({ + type: "string", + entity: "string", + detail: "number?", + hours_to_show: "number?", +}); + export const headerFooterConfigStructs = struct.union([ pictureHeaderFooterConfigStruct, buttonsHeaderFooterConfigStruct, + graphHeaderFooterConfigStruct, ]); From 3763d7a1d00b1a27f5eca743cedf5720fa01182d Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Mon, 23 Mar 2020 14:33:45 -0500 Subject: [PATCH 37/66] Use horizontal control icons for devices that commonly move horizontally (#5309) * Use horizontal control icons for devices that commonly move horizontally including: awning curtain gate * no need to check * remove debug * reduce - js is so permissive * remove curtain --- src/components/ha-cover-controls.js | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/src/components/ha-cover-controls.js b/src/components/ha-cover-controls.js index 76aa911755..b669d23eb9 100644 --- a/src/components/ha-cover-controls.js +++ b/src/components/ha-cover-controls.js @@ -19,7 +19,7 @@ class HaCoverControls extends PolymerElement {
Date: Tue, 24 Mar 2020 00:57:08 +0000 Subject: [PATCH 38/66] [ci skip] Translation update --- translations/ca.json | 14 ++++---- translations/es.json | 3 +- translations/fr.json | 20 +++++------ translations/ko.json | 4 +-- translations/lb.json | 19 ++++++++++- translations/sk.json | 80 +++++++++++++++++++++++++++++++++++++++----- 6 files changed, 111 insertions(+), 29 deletions(-) diff --git a/translations/ca.json b/translations/ca.json index 88422bc0a7..3ae4d6ebb3 100644 --- a/translations/ca.json +++ b/translations/ca.json @@ -621,7 +621,7 @@ "dismiss": "Desestimar", "editor": { "confirm_delete": "Estàs segur que vols eliminar aquesta entrada?", - "delete": "ELIMINA", + "delete": "Suprimeix", "enabled_cause": "Desactivada per {cause}.", "enabled_description": "Les entitats desactivades no s’afegiran a Home Assistant.", "enabled_label": "Activa l’entitat", @@ -631,7 +631,7 @@ "name": "Substitució de Nom", "note": "Nota: podria no funcionar amb alguna de les integracions.", "unavailable": "Aquesta entitat no està disponible actualment.", - "update": "ACTUALITZA" + "update": "Actualitza" }, "no_unique_id": "Aquesta entitat no té un ID únic, per tant, no pot ser configurada des de la interfície d'usuari.", "related": "Relacionat", @@ -816,14 +816,14 @@ }, "description": "Visió general de totes les àrees de la casa.", "editor": { - "create": "CREAR", + "create": "Crea", "default_name": "Nova àrea", - "delete": "ELIMINA", - "update": "ACTUALITZAR" + "delete": "Suprimeix", + "update": "Actualitza" }, "no_areas": "Sembla que encara no tens cap àrea!.", "picker": { - "create_area": "CREA ÀREA", + "create_area": "Crea àrea", "header": "Registre d'àrees", "integrations_page": "Pàgina d'integracions", "introduction": "Les àrees s'utilitzen per organitzar la situació dels dispositius. Aquesta informació serà utilitzada per Home Assistant per ajudar-te a organitzar millor la teva interfície, els permisos i les integracions amb d'altres sistemes.", @@ -2159,7 +2159,7 @@ "maximum": "Màxim", "minimum": "Mínim", "name": "Nom", - "no_theme": "Sense temes", + "no_theme": "Sense tema", "refresh_interval": "Interval d'actualització", "show_icon": "Mostra icona?", "show_name": "Mostra nom?", diff --git a/translations/es.json b/translations/es.json index 9cb61d6f78..998cfdc05f 100644 --- a/translations/es.json +++ b/translations/es.json @@ -2333,7 +2333,8 @@ "view": { "panel_mode": { "description": "Esto muestra la primera tarjeta a ancho completo; otras tarjetas en esta vista no se mostrarán.", - "title": "¿Modo de panel?" + "title": "¿Modo de panel?", + "warning_multiple_cards": "Esta vista contiene más de una tarjeta, pero la vista del panel solo puede mostrar 1 tarjeta." } } }, diff --git a/translations/fr.json b/translations/fr.json index e48a610fd4..db0b7961e0 100644 --- a/translations/fr.json +++ b/translations/fr.json @@ -302,7 +302,7 @@ }, "light": { "off": "Éteinte", - "on": "Allumée" + "on": "Actif" }, "lock": { "locked": "Verrouillé", @@ -426,7 +426,7 @@ "heating": "{name} chauffage", "high": "haute", "low": "basse", - "on_off": "Allumé / Éteint", + "on_off": "On / off", "operation": "Opération", "preset_mode": "Préréglage", "swing_mode": "Mode de balancement", @@ -621,7 +621,7 @@ "dismiss": "Ignorer", "editor": { "confirm_delete": "Voulez-vous vraiment supprimer cette entrée ?", - "delete": "SUPPRIMER", + "delete": "Supprimer", "enabled_cause": "Désactivé par {cause} .", "enabled_description": "Les entités désactivées ne seront pas ajoutées à Home Assistant.", "enabled_label": "Activer l'entité", @@ -631,7 +631,7 @@ "name": "Remplacement de nom", "note": "Remarque: cela peut ne pas encore fonctionner avec toutes les intégrations.", "unavailable": "Cette entité n'est pas disponible actuellement.", - "update": "MISE À JOUR" + "update": "Mise à jour" }, "no_unique_id": "Cette entité n'a pas d'identifiant unique, ses paramètres ne peuvent donc pas être gérés à partir de l'interface utilisateur.", "related": "Liées", @@ -664,7 +664,7 @@ "min": "Valeur minimum", "mode": "Mode d'affichage", "slider": "Curseur", - "step": "Taille de pas du curseur", + "step": "Taille du pas du curseur", "unit_of_measurement": "Unité de mesure" }, "input_select": { @@ -816,14 +816,14 @@ }, "description": "Vue d'ensemble de toutes les pièces de votre maison.", "editor": { - "create": "CRÉER", + "create": "Créer", "default_name": "Nouvelle pièce", - "delete": "SUPPRIMER", - "update": "METTRE À JOUR" + "delete": "Supprimer", + "update": "Mise à jour" }, "no_areas": "Vous n'avez pas encore configuré de pièce !", "picker": { - "create_area": "CRÉER UNE PIÈCE", + "create_area": "Créer une zone", "header": "Pièces", "integrations_page": "Page des intégrations", "introduction": "Les pièces sont utilisées pour organiser l'emplacement des périphériques. Ces informations seront utilisées partout dans Home Assistant pour vous aider à organiser votre interface, vos autorisations et vos intégrations avec d'autres systèmes.", @@ -2102,7 +2102,7 @@ "name": "Panneau d'alarme" }, "button": { - "description": "La carte Boutons vous permet d'ajouter des boutons pour effectuer des tâches.", + "description": "La carte Button vous permet d'ajouter des boutons pour effectuer des tâches.", "name": "Bouton" }, "conditional": { diff --git a/translations/ko.json b/translations/ko.json index 1aa3a40378..e0a5f89404 100644 --- a/translations/ko.json +++ b/translations/ko.json @@ -2285,7 +2285,7 @@ "tab_settings": "설정", "tab_visibility": "가시성", "visibility": { - "select_users": "탐색에서 이 뷰를 볼 사용자를 선택해주세요" + "select_users": "이 뷰를 볼 수 있는 사용자를 선택해주세요" } }, "header": "UI 편집", @@ -2334,7 +2334,7 @@ "panel_mode": { "description": "패널 모드는 첫 번째 카드를 전체 너비로 보여줍니다. 이 뷰에서는 다른 카드는 보여지지 않습니다.", "title": "패널 모드", - "warning_multiple_cards": "이 뷰에는 카드가 두 개 이상 포함되어 있지만 패널 모드는 한 개의 카드만 표시될 수 있습니다." + "warning_multiple_cards": "이 뷰에는 카드가 두 개 이상 포함되어 있지만 패널 모드는 한 개의 카드만 표시할 수 있습니다." } } }, diff --git a/translations/lb.json b/translations/lb.json index 410632d8f1..9b933f6480 100644 --- a/translations/lb.json +++ b/translations/lb.json @@ -627,6 +627,7 @@ "enabled_label": "Entitéit aktivéieren", "entity_id": "ID vun der Entitéit", "icon": "Ikon iwwerschreiwen", + "icon_error": "Ikonen sollten am format 'prefix:numm' sinn, Beispill: 'mdi:home'", "name": "Numm iwwerschreiwen", "note": "Nott: dëst funktionéiert villäicht nach net mat all Integratioun.", "unavailable": "Dës Entitéit ass net erreechbar fir de Moment.", @@ -657,6 +658,7 @@ "time": "Zäit" }, "input_number": { + "box": "Angab Feld", "max": "Maximale Wäert", "min": "Minimale Wäert", "mode": "Affichage Modus", @@ -1303,6 +1305,7 @@ "automations": "Automatisme", "cant_edit": "Dir kënnt nëmmen Elementer änneren déi an der UI erstallt goufen.", "caption": "Apparater", + "confirm_delete": "Sécher fir dësen Appara ze läsche?", "confirm_rename_entity_ids": "Wëllt Dir och d'Entitéiten-ID vun Ären Entitéiten ëmbenennen?", "data_table": { "area": "Beräich", @@ -1313,6 +1316,7 @@ "model": "Modell", "no_devices": "Keng Apparater" }, + "delete": "Läschen", "description": "Verwalt verbonnen Apparater", "details": "Hei sinn all Detailer vun ärem Apparat.", "device_not_found": "Apparat net fonnt.", @@ -1386,6 +1390,7 @@ "introduction2": "Benotzt d'Lëscht vun den Entitéite fir d'Nimm z'änneren, d'Entitéits ID z'änneren oder d'Entrée aus dem Home Assistant ze läschen. Remarque: Läsche vun der Entitéit aus der Lëscht läscht d'Entitéit selwer net. Fir dës ze läsche follegt dem Link ënnen a läscht et op der Integratiouns Säit.", "remove_selected": { "button": "Ausgewielte läschen", + "confirm_partly_text": "Nëmmen {removable} vun den ausgewielten {selected} Entitéite kënne geläscht ginn. Entitéiten kënne nëmmen geläscht ginn wann eng Integratioun déi Entitéiten net méi zur Verfügung stellt. Heiansdo muss Home Assistant frësch gestart ginn fir Entitéiten vun enger geläschten Integratioun ze läschen. Sécher fir déi läschbar Entitéiten ze läschen?", "confirm_text": "Entitéiten kënne nëmmen geläscht gin wann d'Integratioun d'Entitéiten net méi zur Verfügung stellt.", "confirm_title": "Wëllt dir {number} Entitéite läschen?" }, @@ -1395,6 +1400,7 @@ "disabled": "Deaktivéiert", "ok": "Ok", "readonly": "Nëmme liesen", + "restored": "Restauréiert", "unavailable": "Net erreechbar" }, "unavailable": "(net verfügbar)" @@ -1459,6 +1465,7 @@ }, "failed_create_area": "Feeler beim erstellen vum Beräich.", "finish": "Ofschléissen", + "loading_first_time": "Waart w.e.g. während der Installatioun vun der Integratioun", "name_new_area": "Numm vum neie Beräich?", "not_all_required_fields": "Net all erfuerderlech Felder sinn ausgefëllt.", "submit": "Ofschécken" @@ -1497,6 +1504,7 @@ "yaml": "Yaml Fichier" }, "confirm_delete": "Sécher fir dëse Tableau de Bord ze läschen?", + "default_dashboard": "Dëst ass den Standard Tableau de Bord", "detail": { "create": "Erstellen", "delete": "Läschen", @@ -2138,6 +2146,7 @@ "maximum": "Maximum", "minimum": "Minimum", "name": "Numm", + "no_theme": "Kee Thema", "refresh_interval": "Aktualiséierungs Intervall", "show_icon": "Ikon uweisen?", "show_name": "Numm uweisen?", @@ -2157,7 +2166,7 @@ "name": "Verlaf Diagramm" }, "horizontal-stack": { - "description": "Horizontaé Kaart erlaabt et méi Kaarten ze gruppéieren fir dass se ëmmer an der selwechter Rei ugewise ginn.", + "description": "Horizontal Kaart erlaabt et méi Kaarten ze gruppéieren fir dass se ëmmer an der selwechter Rei ugewise ginn.", "name": "Horizontale Stapel" }, "iframe": { @@ -2229,6 +2238,7 @@ "edit_card": { "add": "Kaart dobäisetzen", "delete": "Läschen", + "duplicate": "Kaart Replikéieren", "edit": "Änneren", "header": "Kaart Konfiguratioun", "move": "Réckelen", @@ -2312,9 +2322,14 @@ "exit_edit_mode": "Benotzer Interface Editéierungsmodus verloossen", "help": "Hëllef", "refresh": "Erneieren", + "reload_resources": "Ressource frësch lueden", "unused_entities": "Onbenotzt Entitéiten" }, "reload_lovelace": "Lovelace frësch lueden", + "reload_resources": { + "refresh_body": "D'Säit muss aktualiséiert gi fir d'Aktualiséierung ofzeschléissen, elo aktualiséieren?", + "refresh_header": "Soll aktualiséiert ginn?" + }, "unused_entities": { "available_entities": "Dës si verfügbar Entitéiten, déi awer nach net an ärer Lovelace UI sinn.", "domain": "Domän", @@ -2326,6 +2341,8 @@ }, "views": { "confirm_delete": "Sécher fir dës Usiicht ze läsche?", + "confirm_delete_existing_cards": "D'Läschen vun dëser Usiicht läscht och d'Kaarten", + "confirm_delete_text": "Sécher fir d'Usiicht '{name}' ze läsche?", "existing_cards": "Dir kënnt keng Usiicht mat Kaarten läschen. Läscht d'Kaarten fir d'éischt." }, "warning": { diff --git a/translations/sk.json b/translations/sk.json index 77ca5dcb1c..c12acd590e 100644 --- a/translations/sk.json +++ b/translations/sk.json @@ -632,10 +632,12 @@ }, "restored": { "confirm_remove_text": "Naozaj chcete odstrániť túto entitu?", + "confirm_remove_title": "Odstrániť entitu?", "not_provided": "Táto entita je momentálne nedostupná a je ojedinelou pre odstránenú, zmenenú alebo nefunkčnú integráciu alebo zariadenie." }, "script": { - "last_action": "Posledná akcia" + "last_action": "Posledná akcia", + "last_triggered": "Naposledy spustené" }, "settings": "Nastavenie entity", "sun": { @@ -988,7 +990,8 @@ "enter_pin_hint": "Ak chcete používať bezpečnostné zariadenia, zadajte kód PIN", "manage_entities": "Spravovať entity", "security_devices": "Zabezpečovacie zariadenia", - "sync_entities": "Synchronizovať entity so službou Google" + "sync_entities": "Synchronizovať entity so službou Google", + "title": "Google Assistant" }, "integrations": "Integrácie", "integrations_introduction": "Integrácia Home Assistant Cloud vám umožňuje pripojiť sa k službám v cloude bez toho, aby ste museli verejne publikovať inštanciu Home Assistant do internetu.", @@ -1021,7 +1024,8 @@ } }, "alexa": { - "banner": "Úprava týchto entít cez toto používateľské rozhranie je zakázaná, pretože ste nakonfigurovali filtre entít v súbore Configuration.yaml." + "banner": "Úprava týchto entít cez toto používateľské rozhranie je zakázaná, pretože ste nakonfigurovali filtre entít v súbore Configuration.yaml.", + "title": "Alexa" }, "caption": "Home Assistant Cloud", "description_features": "Ovládanie mimo domova, integrácia s Alexa a Google Assistant.", @@ -1045,11 +1049,13 @@ "check_your_email": "Pokyny na obnovenie hesla nájdete vo svojom e-maile.", "instructions": "Zadajte svoju e-mailovú adresu a my vám pošleme odkaz na obnovenie hesla.", "send_reset_email": "Poslať resetovací e-mail", + "subtitle": "Zabudli ste heslo", "title": "Zabudnuté heslo" }, "google": { "banner": "Úprava týchto entít cez toto používateľské rozhranie je zakázaná, pretože ste nakonfigurovali filtre entít v súbore Configuration.yaml.", - "not_exposed_entities": "Nezverejnené entity" + "not_exposed_entities": "Nezverejnené entity", + "title": "Google Assistant" }, "login": { "alert_password_change_required": "Pred prihlásením musíte zmeniť svoje heslo.", @@ -1061,6 +1067,7 @@ "password": "Heslo", "sign_in": "Prihlásiť sa", "start_trial": "Začnite bezplatnú 1-mesačnú skúšobnú verziu", + "title": "Prihlásenie do cloudu", "trial_info": "Nie sú potrebné žiadne platobné informácie" }, "register": { @@ -1159,6 +1166,7 @@ "automations": "Automatizácie", "caption": "Zariadenia", "data_table": { + "area": "Oblasť", "battery": "Batérie", "device": "Zariadenie", "integration": "Integrácia", @@ -1200,7 +1208,11 @@ }, "picker": { "disable_selected": { - "confirm_text": "Zakázané entity nebudú pridané do Home Assistanta" + "confirm_text": "Zakázané entity nebudú pridané do Home Assistanta", + "confirm_title": "Chcete zakázať {number} entity?" + }, + "enable_selected": { + "confirm_title": "Chcete povoliť {number} entity?" }, "filter": { "show_disabled": "Zobraziť zakázané entity" @@ -1215,7 +1227,9 @@ "introduction": "Home Assistant vedie register všetkých subjektov, ktoré kedy videl a ktoré môžu byť jednoznačne identifikované. Každá z týchto entít bude mať pridelené ID, ktoré bude vyhradené len pre tento subjekt.", "introduction2": "Použite register entít na prepísanie mena, zmenu ID entity alebo odstránenie položky z Home Assistant. Poznámka: Odstránenie položky databázy entít neodstráni entitu. Postupujte podľa nižšie uvedeného odkazu a odstráňte ho z integračnej stránky.", "remove_selected": { - "confirm_text": "Entity je možné odstrániť, iba ak ich integrácia už neposkytuje." + "confirm_partly_title": "Iba {number} vybrané entity môžu byť odstránené.", + "confirm_text": "Entity je možné odstrániť, iba ak ich integrácia už neposkytuje.", + "confirm_title": "Chcete odstrániť {number} entity?" }, "show_disabled": "Zobraziť zakázané entity", "status": { @@ -1288,7 +1302,10 @@ "discovered": "Objavené", "home_assistant_website": "Home Assistant webová stránka", "ignore": { + "confirm_delete_ignore_title": "Prestať ignorovať {name} ?", "confirm_ignore": "Naozaj nechcete nastaviť túto integráciu? Túto akciu môžete vrátiť späť kliknutím na položku „Zobraziť ignorované integrácie“ v ponuke v pravom hornom rohu.", + "confirm_ignore_title": "Ignorovať objav {name}?", + "hide_ignored": "Skryť ignorované integrácie", "show_ignored": "Zobraziť ignorované integrácie", "stop_ignore": "Zastaviť ignorovanie" }, @@ -1505,16 +1522,25 @@ "description": "Správa používateľov", "editor": { "activate_user": "Aktivovať používateľa", + "active": "Aktívny", "caption": "Zobraziť používateľa", "change_password": "Zmeniť heslo", "confirm_user_deletion": "Naozaj chcete odstrániť {name}?", "deactivate_user": "Deaktivovať používateľa", "delete_user": "Vymazať používateľa", + "enter_new_name": "Zadajte nový názov", + "group": "Skupina", "group_update_failed": "Aktualizácia skupiny zlyhala:", + "id": "ID", + "owner": "Vlastník", "rename_user": "Premenovať používateľa", - "system_generated_users_not_removable": "Nie je možné odstrániť používateľov generovaných systémom." + "system_generated": "Systémom vytvorený", + "system_generated_users_not_removable": "Nie je možné odstrániť používateľov generovaných systémom.", + "unnamed_user": "Nepomenovaný používateľ", + "user_rename_failed": "Premenovanie používateľa zlyhalo:" }, "picker": { + "system_generated": "Systémom vytvorený", "title": "Používatelia" } }, @@ -1581,15 +1607,31 @@ "title": "Zigbee Home Automation" }, "zone": { + "add_zone": "Pridať zónu", "caption": "Zóny", "configured_in_yaml": "Zóny vytvorené prostredníctvom configuration.yaml nie je možné upravovať pomocou používateľského rozhrania.", "confirm_delete": "Naozaj chcete odstrániť túto zónu?", + "create_zone": "Vytvoriť zónu", "description": "Spravujte zóny, v ktorých chcete sledovať osoby.", "detail": { + "create": "Vytvoriť", "delete": "Odstrániť", + "icon": "Ikona", + "icon_error_msg": "Ikona by mala byť vo formáte predpona:názov-ikony, napríklad: mdi:home", + "latitude": "Zemepisná šírka", + "longitude": "Zemepisná dĺžka", + "name": "Názov", + "new_zone": "Nová zóna", + "passive": "Pasívne", "passive_note": "Pasívne zóny sú skryté vo frontende a nie sú používané ako umiestnenia pre sledovacie zariadenia. Toto je užitočné, ak chcete používať zóny len pre automatizácie.", + "radius": "Okruh", + "required_error_msg": "Toto pole je povinné", "update": "Aktualizovať" }, + "edit_home_zone": "Okruh domovskej zóny zatiaľ nie je možné upravovať z frontendu. Presunutím značky na mape presuniete domácu zónu.", + "edit_home_zone_narrow": "Okruh domovskej zóny zatiaľ nie je možné upravovať z frontendu. Poloha sa dá zmeniť zo všeobecnej konfigurácie.", + "go_to_core_config": "Prejsť na všeobecnú konfiguráciu?", + "home_zone_core_config": "Umiestnenie vašej domácej zóny je možné upravovať na stránke so všeobecnou konfiguráciou. Okruh domovskej zóny zatiaľ nie je možné upravovať z frontendu. Chcete prejsť na všeobecnú konfiguráciu?", "introduction": "Zóny vám umožňujú vybrať špecifické oblasti na mape. Ak sa osoba nachádza v nejakej zóne, v stavoch sa zobrazí názov konkrétnej zóny. Zóny môžu byť tiež použité ako spúšťač alebo podmienka v rámci automatizácií.", "no_zones_created_yet": "Zdá sa, že ste ešte nevytvorili žiadne zóny." }, @@ -1766,6 +1808,9 @@ "no_devices": "Táto stránka vám umožňuje ovládať vaše zariadenia, zdá sa však, že ešte nemáte nastavené žiadne zariadenia. Ak chcete začať, choďte na stránku integrácií.", "title": "Vitajte doma" }, + "entities": { + "never_triggered": "Nikdy nespustené" + }, "picture-elements": { "call_service": "Zavolať službu {name}", "hold": "Držať:", @@ -1829,6 +1874,7 @@ "show_state": "Zobraziť stav?", "tap_action": "Akcia pri stlačení", "theme": "Téma", + "title": "Názov", "unit": "Jednotka", "url": "Url" }, @@ -1899,12 +1945,14 @@ "move": "Presunúť", "options": "Viac možností", "pick_card": "Ktorú kartu chcete pridať?", + "pick_card_view_title": "Ktorú kartu chcete pridať do svojho zobrazenia {name} ?", "save": "Uložiť", "show_code_editor": "Zobraziť editor kódu", "show_visual_editor": "Zobraziť vizuálny editor", "toggle_editor": "Prepnúť editor" }, "edit_lovelace": { + "edit_title": "Upraviť názov", "explanation": "Tento názov sa zobrazuje nad všetkými vašimi zobrazeniami v Lovelace.", "header": "Názov vášho Lovelace UI" }, @@ -1913,7 +1961,13 @@ "delete": "Odstrániť zobrazenie", "edit": "Upraviť zobrazenie", "header": "Konfigurácia zobrazenia", - "header_name": "{name} Zobraziť konfiguráciu" + "header_name": "{name} Zobraziť konfiguráciu", + "tab_badges": "Odznaky", + "tab_settings": "Nastavenia", + "tab_visibility": "Viditeľnosť", + "visibility": { + "select_users": "Vyberte, ktorí používatelia môžu vidieť toto zobrazenie v navigácii" + } }, "header": "Upraviť používateľské rozhranie", "menu": { @@ -1972,6 +2026,15 @@ "refresh_body": "Ak chcete dokončiť načítanie, musíte stránku obnoviť. Chcete ju teraz obnoviť?", "refresh_header": "Chcete obnoviť?" }, + "unused_entities": { + "available_entities": "Toto sú entity, ktoré máte k dispozícii, ale ešte nie sú vo vašom používateľskom rozhraní Lovelace.", + "domain": "Doména", + "entity": "Entita", + "entity_id": "Entity ID", + "last_changed": "Posledná zmena", + "select_to_add": "Vyberte entity, ktoré chcete pridať na kartu, a potom kliknite na tlačidlo Pridať kartu.", + "title": "Nepoužité entity" + }, "views": { "confirm_delete": "Naozaj chcete odstrániť toto zobrazenie?", "confirm_delete_existing_cards_text": "Naozaj chcete odstrániť zobrazenie '{name}'? Toto zobrazenie obsahuje {number} kariet, ktoré budú odstránené. Túto akciu nie je možné vrátiť späť.", @@ -2185,6 +2248,7 @@ }, "logout": "Odhlásiť sa", "logout_text": "Naozaj sa chcete odhlásiť?", + "logout_title": "Odhlásiť sa?", "long_lived_access_tokens": { "confirm_delete": "Naozaj chcete odstrániť prístupový token pre {name}?", "create": "Vytvoriť Token", From 013808b7f53ca8571f5ba39efee0372f5004f84c Mon Sep 17 00:00:00 2001 From: sdotter Date: Tue, 24 Mar 2020 13:18:45 +0100 Subject: [PATCH 39/66] Fixed iframe panel unnecessary scrollbar (on 100vh -64px) (#5326) * Fixed iframe panel unnecessary scrollbar (on 100vh -64px) * Fixed iframe panel unnecessary scrollbar (removed margin-top) No need for margin-top --- src/panels/iframe/ha-panel-iframe.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/panels/iframe/ha-panel-iframe.js b/src/panels/iframe/ha-panel-iframe.js index c6321414ac..787ef88cbd 100644 --- a/src/panels/iframe/ha-panel-iframe.js +++ b/src/panels/iframe/ha-panel-iframe.js @@ -12,6 +12,7 @@ class HaPanelIframe extends PolymerElement { iframe { border: 0; width: 100%; + position: absolute; height: calc(100% - 64px); background-color: var(--primary-background-color); } From ed512232267ad3ed643e4a9670fbd9ca13b8f575 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Tue, 24 Mar 2020 14:16:21 +0100 Subject: [PATCH 40/66] Update azure-pipelines-release.yml for Azure Pipelines --- azure-pipelines-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines-release.yml b/azure-pipelines-release.yml index 5fceabc52a..1d331a82d7 100644 --- a/azure-pipelines-release.yml +++ b/azure-pipelines-release.yml @@ -8,7 +8,7 @@ trigger: pr: none variables: - name: versionWheels - value: '1.3-3.7-alpine3.10' + value: '1.10.1-3.7-alpine3.11' - name: versionNode value: '12.1' - group: twine From 6aae1b3378a82b671d491e9a8f7208d030b9f12e Mon Sep 17 00:00:00 2001 From: Aidan Timson Date: Tue, 24 Mar 2020 14:08:51 +0000 Subject: [PATCH 41/66] Fix Default Lovelace Panel Title (#5301) * Fix lovelace panel title * Fix types error * Revert and workaround null type * Update src/data/panel.ts Co-Authored-By: Bram Kragten * Update panel.ts * Update panel.ts Co-authored-by: Bram Kragten --- src/data/panel.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/data/panel.ts b/src/data/panel.ts index 3ee88a7f96..079ebe884c 100644 --- a/src/data/panel.ts +++ b/src/data/panel.ts @@ -22,14 +22,13 @@ export const getPanelTitle = (hass: HomeAssistant): string | undefined => { return; } + if (panel.url_path === "lovelace") { + return hass.localize("panel.states"); + } + if (panel.url_path === "profile") { return hass.localize("panel.profile"); } - return ( - hass.localize(`panel.${panel.title}`) || - panel.title || - // default panel - (hass.panels[localStorage.defaultPage] || hass.panels[DEFAULT_PANEL]).title! - ); + return hass.localize(`panel.${panel.title}`) || panel.title || undefined; }; From 2408f9b8fa358b26c6208cc870c1b6dff37d8c4f Mon Sep 17 00:00:00 2001 From: HomeAssistant Azure Date: Wed, 25 Mar 2020 00:32:35 +0000 Subject: [PATCH 42/66] [ci skip] Translation update --- translations/cy.json | 5 +++ translations/de.json | 5 ++- translations/ru.json | 11 ++++- translations/sk.json | 103 ++++++++++++++++++++++++++++++++++++++++--- 4 files changed, 116 insertions(+), 8 deletions(-) diff --git a/translations/cy.json b/translations/cy.json index ae3c46604e..4f73ecf851 100644 --- a/translations/cy.json +++ b/translations/cy.json @@ -1149,6 +1149,11 @@ "para": "Gwneith Home Assistant gynnal eich rhyngwyneb defnyddiwr yn ddiofyn, a'i diweddaru pan fydd endidau neu gydrannau Lovelace newydd yn dod ar gael. Os ydych yn cymryd rheolaeth nawn ddim gwneud newidiadau awtomatig pellach i chi.", "para_sure": "A ydych yn siŵr bod chi eisiau rheoli eich rhyngwyneb defnyddiwr?", "save": "Cymerwch reolaeth" + }, + "view": { + "panel_mode": { + "warning_multiple_cards": "Mae'r golwg yn cynnwys mwy nag un cerdyn, ond dim ond un cerdyn gall y golwg panel ei ddangos." + } } }, "menu": { diff --git a/translations/de.json b/translations/de.json index 66dabd03a5..4c6b30f20e 100644 --- a/translations/de.json +++ b/translations/de.json @@ -664,7 +664,7 @@ "min": "Minimaler Wert", "mode": "Anzeigemodus", "slider": "Schieberegler", - "step": "Schrittweite des Schiebereglers", + "step": "Schrittgröße", "unit_of_measurement": "Maßeinheit" }, "input_select": { @@ -2332,7 +2332,8 @@ "view": { "panel_mode": { "description": "Dadurch wird die erste Karte in voller Breite gerendert. Andere Karten in dieser Ansicht werden nicht gerendert.", - "title": "Panel-Modus?" + "title": "Panel-Modus?", + "warning_multiple_cards": "Diese Ansicht enthält mehr als eine Karte, in einer Bedienfeldansicht kann jedoch nur eine Karte angezeigt werden." } } }, diff --git a/translations/ru.json b/translations/ru.json index 5f69ea77b9..27e2dcb308 100644 --- a/translations/ru.json +++ b/translations/ru.json @@ -626,6 +626,7 @@ "enabled_description": "Отключенные объекты не будут доступны в Home Assistant.", "enabled_label": "Включить объект", "entity_id": "ID объекта", + "icon": "Переопределение иконки", "icon_error": "Параметр значка должен быть указан в формате \"префикс:имя-значка\" (например: mdi:home)", "name": "Название", "note": "(может работать не со всеми интеграциями)", @@ -1785,8 +1786,15 @@ "header": "Zigbee Home Automation - Устройство" }, "group_binding": { + "bind_button_help": "Привяжите выбранную группу к выбранным кластерам устройств.", + "bind_button_label": "Привязать группу", "cluster_selection_help": "Выберите кластеры для привязки к выбранной группе.", - "group_picker_label": "Связываемые группы" + "group_picker_help": "Выберите группу, чтобы выполнить команду привязки.", + "group_picker_label": "Связываемые группы", + "header": "Привязка групп", + "introduction": "Привязывайте и отвязывайте группы.", + "unbind_button_help": "Отвяжите выбранную группу от выбранных кластеров устройств.", + "unbind_button_label": "Отвязать группу" }, "groups": { "add_members": "Добавить участников", @@ -2301,6 +2309,7 @@ "error_remove": "Не удалось удалить конфигурацию: {error}", "error_save_yaml": "Не удалось сохранить YAML: {error}", "header": "Редактирование конфигурации", + "resources_moved": "Ресурсы не должны более добавляться в конфигурацию Lovelace, но их можно добавить на панели конфигурации Lovelace.", "save": "Сохранить", "saved": "Сохранено", "unsaved_changes": "Несохраненные изменения" diff --git a/translations/sk.json b/translations/sk.json index c12acd590e..b087c8731a 100644 --- a/translations/sk.json +++ b/translations/sk.json @@ -477,6 +477,9 @@ "script": { "execute": "Vykonať" }, + "service": { + "run": "Spustiť" + }, "timer": { "actions": { "cancel": "Zrušiť", @@ -555,7 +558,8 @@ "device-picker": { "clear": "Vyčistiť", "device": "Zariadenie", - "show_devices": "Zobraziť zariadenia" + "show_devices": "Zobraziť zariadenia", + "toggle": "Prepínač" }, "entity": { "entity-picker": { @@ -608,14 +612,19 @@ "title": "Ste si istý?" }, "entity_registry": { + "control": "Ovládanie", + "dismiss": "Zrušiť", "editor": { "confirm_delete": "Naozaj chcete odstrániť túto entitu?", "delete": "VYMAZAŤ", + "enabled_cause": "Zakázané {cause}", "enabled_description": "Zakázané entity nebudú pridané do Home Assistanta", "enabled_label": "Povoliť entitu", + "entity_id": "Entity ID", "icon": "Zmeniť ikonu", "name": "Prepísať názov", "note": "Poznámka: toto nemusí zatiaľ fungovať so všetkými integráciami.", + "unavailable": "Táto entita nie je momentálne k dispozícii.", "update": "AKTUALIZOVAŤ" }, "related": "Súvisiace", @@ -623,9 +632,43 @@ }, "generic": { "cancel": "Zrušiť", + "close": "zavrieť", "default_confirmation_title": "Ste si istý?", "ok": "OK" }, + "helper_settings": { + "input_datetime": { + "date": "Dátum", + "datetime": "Dátum a čas", + "has_date": "Dátum", + "has_time": "Čas", + "mode": "Čo chcete zadať", + "time": "Čas" + }, + "input_number": { + "box": "Vstupné pole", + "max": "Maximálna hodnota", + "min": "Minimálna hodnota", + "mode": "Režim zobrazenia", + "slider": "Slider", + "step": "Veľkosť kroku", + "unit_of_measurement": "Meracia jednotka" + }, + "input_select": { + "add": "Pridať", + "add_option": "Pridať možnosť", + "no_options": "Zatiaľ nie sú k dispozícii žiadne možnosti.", + "options": "Možnosti" + }, + "input_text": { + "max": "Maximálna dĺžka", + "min": "Minimálna dĺžka", + "mode": "Režim zobrazenia", + "password": "Heslo", + "pattern": "Vzor regexu na overenie na strane klienta", + "text": "Text" + } + }, "more_info_control": { "person": { "create_zone": "Vytvoriť zónu z aktuálnej polohy" @@ -647,6 +690,9 @@ }, "updater": { "title": "Pokyny pre aktualizáciu" + }, + "vacuum": { + "status": "Stav" } }, "more_info_settings": { @@ -723,6 +769,7 @@ "caption": "Register oblastí", "create_area": "VYTVORIŤ OBLASŤ", "delete": { + "confirmation_text": "Všetky zariadenia v tejto oblasti nebudú priradené.", "confirmation_title": "Naozaj chcete odstrániť túto oblasť?" }, "description": "Prehľad všetkých oblastí vo vašej domácnosti.", @@ -1164,18 +1211,23 @@ } }, "automations": "Automatizácie", + "cant_edit": "Môžete upravovať iba položky, ktoré sú vytvorené v používateľskom rozhraní.", "caption": "Zariadenia", + "confirm_delete": "Naozaj chcete odstrániť toto zariadenie?", "data_table": { "area": "Oblasť", "battery": "Batérie", "device": "Zariadenie", "integration": "Integrácia", - "manufacturer": "Výrobca" + "manufacturer": "Výrobca", + "no_devices": "Žiadne zariadenia" }, + "delete": "Odstrániť", "description": "Spravovať pripojené zariadenia", "entities": { "add_entities_lovelace": "Pridať do Lovelace" }, + "name": "Názov", "scene": { "create": "Vytvorte scénu pomocou zariadenia", "no_scenes": "Žiadne scény", @@ -1201,6 +1253,7 @@ "enabled_cause": "Zakázané {cause}", "enabled_description": "Zakázané entity nebudú pridané do Home Assistanta", "enabled_label": "Povoliť entitu", + "entity_id": "Entity ID", "name": "Prepísať názov", "note": "Poznámka: toto nemusí zatiaľ fungovať so všetkými integráciami.", "unavailable": "Táto entita nie je momentálne k dispozícii.", @@ -1294,6 +1347,7 @@ "open_site": "Otvoriť webovú stránku" }, "failed_create_area": "Nepodarilo sa vytvoriť oblasť.", + "loading_first_time": "Počkajte, kým sa inštaluje integrácia", "name_new_area": "Názov novej oblasti?" }, "configure": "Konfigurovať", @@ -1586,6 +1640,10 @@ "devices": { "header": "Zigbee Home Automation - Zariadenie" }, + "group_binding": { + "bind_button_help": "Prepojte vybranú skupinu na vybrané zoskupenia zariadení.", + "unbind_button_help": "Odpojte vybratú skupinu z vybratých zoskupení zariadení." + }, "groups": { "create_group": "Zigbee Home Automation - Vytvoriť skupinu", "group-header": "Zigbee Home Automation - Podrobnosti o skupine", @@ -1692,11 +1750,13 @@ "tabs": { "events": { "alert_event_type": "Typ udalosti je povinné pole", + "available_events": "Dostupné udalosti", "count_listeners": " ({count} poslucháčov)", "data": "Údaje o udalosti (YAML, voliteľné)", "description": "Spustite udalosť na zbernicu udalostí.", "documentation": "Dokumentácia udalostí.", "event_fired": "Udalosť {name} sa spustila", + "fire_event": "Odpáliť udalosť", "listen_to_events": "Počúvanie udalostí", "listening_to": "Počúvanie", "notification_event_fired": "Udalosť {type} úspešne spustená!", @@ -1843,6 +1903,11 @@ "alarm-panel": { "name": "Ovládací panel alarmu" }, + "conditional": { + "card": "Karta", + "conditions": "Podmienky", + "description": "Karta Podmienka zobrazuje ďalšiu kartu na základe stavu entity" + }, "config": { "optional": "Voliteľné", "required": "Požadované" @@ -1867,11 +1932,15 @@ "icon": "ikona", "icon_height": "Výška ikony", "image": "Cesta k obrázku", + "manual": "Ručne", + "manual_description": "Potrebujete pridať vlastnú kartu, alebo chcete len ručne napísať yaml?", "name": "Názov", + "no_theme": "Žiadna téma", "refresh_interval": "Interval obnovenia", "show_icon": "Zobraziť ikonu?", "show_name": "Zobraziť názov?", "show_state": "Zobraziť stav?", + "state": "Stav", "tap_action": "Akcia pri stlačení", "theme": "Téma", "title": "Názov", @@ -1891,55 +1960,74 @@ "name": "iFrame" }, "light": { + "description": "Karta Svetlo umožňuje zmeniť jas svetla.", "name": "Svetlo" }, "map": { "dark_mode": "Tmavý režim?", "default_zoom": "Predvolený zoom", + "description": "Karta Mapa umožňuje zobraziť entity na mape.", "geo_location_sources": "Zdroje geolokácie", "name": "Mapa", "source": "Zdroj" }, "markdown": { - "content": "Obsah" + "content": "Obsah", + "description": "Karta Markdown sa používa na vykreslenie Markdown.", + "name": "Markdown" }, "media-control": { + "description": "Karta Ovládanie médií sa používa na zobrazenie entít prehrávača médií na rozhraní s ľahko použiteľnými ovládacími prvkami.", "name": "Ovládanie médií" }, "picture-elements": { + "description": "Karta Entita obrázka je jedným z najuniverzálnejších typov kariet. Karty umožňujú umiestňovať ikony alebo text a dokonca aj služby! Na obrázku na základe súradníc.", "name": "Entita obrázka" }, "picture-entity": { + "description": "Karta Entita obrázka zobrazuje entitu vo forme obrázka. Namiesto obrázkov z adresy URL môže zobraziť aj obrázok entít fotoaparátu.", "name": "Entita obrázka" }, "picture-glance": { + "description": "Karta Náhľad obrázka zobrazuje obrázok a stav zodpovedajúcej entity ako ikonu. Subjekty na pravej strane umožňujú prepínacie akcie, iné zobrazujú dialógové okno s ďalšími informáciami.", "name": "Náhľad obrázka" }, "picture": { + "description": "Karta Obrázok vám umožňuje nastaviť obrázok, ktorý je možné použiť na navigáciu vo vašom rozhraní alebo na volanie služby.", "name": "Obrázok" }, + "plant-status": { + "description": "Karta Stav rastlín je určená všetkým nadšeným botanikom.", + "name": "Stav rastlín" + }, "sensor": { + "description": "Karta Senzor poskytuje rýchly prehľad o stave senzorov s voliteľným grafom na vizualizáciu zmien v priebehu času.", "graph_detail": "Detail grafu", "graph_type": "Typ grafu", "name": "Snímač" }, "shopping-list": { + "description": "Karta Nákupný zoznam umožňuje pridávať, upravovať, odškrtávať a vymazávať položky z nákupného zoznamu.", "integration_not_loaded": "Táto karta vyžaduje nastavenie integrácie \"shopping_list\".", "name": "Zoznam nákupov" }, "thermostat": { + "description": "Karta Termostat poskytuje kontrolu nad vašou klimatizačnou jednotkou. Umožní vám zmeniť teplotu a režim entity.", "name": "Termostat" }, "vertical-stack": { + "description": "Karta Zvislé zarovnanie umožňuje zoskupiť viac kariet tak, aby vždy sedeli v rovnakom stĺpci.", "name": "Zvislé zarovnanie" }, "weather-forecast": { + "description": "Karta Predpoveď počasia zobrazuje počasie. Je veľmi užitočné ju zahrnúť do rozhrania, ktoré ľudia zobrazujú na stene.", "name": "Predpoveď počasia" } }, "edit_card": { "add": "Pridať kartu", "delete": "Odstrániť", + "duplicate": "Duplikovať kartu", "edit": "Upraviť", "header": "Konfigurácia karty", "move": "Presunúť", @@ -2001,7 +2089,8 @@ "para_sure": "Skutočne chcete prevziať kontrolu vášho používateľského rozhrania?", "save": "Prevziať kontrolu", "yaml_config": "Na začiatok vám pomôžeme so súčasnou konfiguráciou tohto dashboardu:", - "yaml_control": "Ak chcete prevziať kontrolu v režime YAML, vytvorte súbor YAML s názvom, ktorý ste uviedli vo svojej konfigurácii pre tento dashboard alebo predvolený súbor 'ui-lovelace.yaml'." + "yaml_control": "Ak chcete prevziať kontrolu v režime YAML, vytvorte súbor YAML s názvom, ktorý ste uviedli vo svojej konfigurácii pre tento dashboard alebo predvolený súbor 'ui-lovelace.yaml'.", + "yaml_mode": "Používate režim YAML, čo znamená, že nemôžete zmeniť konfiguráciu Lovelace z používateľského rozhrania. Ak chcete zmeniť Lovelace z UI, odstráňte 'mode: yaml' z vašej konfigurácie Lovelace v 'configuration.yaml.'" }, "suggest_card": { "add": "Pridať do používateľského rozhrania Lovelace", @@ -2010,7 +2099,8 @@ "view": { "panel_mode": { "description": "Takto bude prvá karta v plnej šírke; ostatné karty v tomto zobrazení sa nebudú vykresľovať.", - "title": "Režim panelu?" + "title": "Režim panelu?", + "warning_multiple_cards": "Toto zobrazenie obsahuje viac ako jednu kartu, ale na panelovom zobrazení môže byť iba jedna karta." } } }, @@ -2037,10 +2127,12 @@ }, "views": { "confirm_delete": "Naozaj chcete odstrániť toto zobrazenie?", + "confirm_delete_existing_cards": "Odstránením tohto zobrazenia sa odstránia aj karty", "confirm_delete_existing_cards_text": "Naozaj chcete odstrániť zobrazenie '{name}'? Toto zobrazenie obsahuje {number} kariet, ktoré budú odstránené. Túto akciu nie je možné vrátiť späť.", "confirm_delete_text": "Naozaj chcete odstrániť zobrazenie '{name}'?" }, "warning": { + "attribute_not_found": "Atribút {attribute} nie je k dispozícii v: {entity}", "entity_non_numeric": "Entita je nečíselná: {entity}", "entity_not_found": "Entita nie je k dispozícií {entity}" } @@ -2225,6 +2317,7 @@ "profile": { "advanced_mode": { "description": "Home Asistent v predvolenom nastavení skryje rozšírené funkcie a možnosti. Začiarknutím tohto prepínača môžete tieto funkcie sprístupniť. Toto nastavenie je špecifické pre konkrétneho používateľa a nemá vplyv na ostatných používateľov používajúcich Home Assistant.", + "link_promo": "Viac informácií", "title": "Rozšírený režim" }, "change_password": { From a17c1052cd84591b4b54477c7cc44e6cd8648ef0 Mon Sep 17 00:00:00 2001 From: HomeAssistant Azure Date: Thu, 26 Mar 2020 00:32:45 +0000 Subject: [PATCH 43/66] [ci skip] Translation update --- translations/de.json | 1 + translations/es.json | 8 +++--- translations/hu.json | 65 +++++++++++++++++++++++++++----------------- translations/lb.json | 9 ++++-- 4 files changed, 52 insertions(+), 31 deletions(-) diff --git a/translations/de.json b/translations/de.json index 4c6b30f20e..eb8bb14948 100644 --- a/translations/de.json +++ b/translations/de.json @@ -2159,6 +2159,7 @@ "maximum": "Maximum", "minimum": "Minimum", "name": "Name", + "no_theme": "Kein Theme", "refresh_interval": "Aktualisierungsintervall", "show_icon": "Symbol anzeigen?", "show_name": "Namen anzeigen?", diff --git a/translations/es.json b/translations/es.json index 998cfdc05f..99be8490c8 100644 --- a/translations/es.json +++ b/translations/es.json @@ -411,7 +411,7 @@ }, "automation": { "last_triggered": "Última activación", - "trigger": "Desencadenar" + "trigger": "Ejecutar" }, "camera": { "not_available": "Imagen no disponible" @@ -664,7 +664,7 @@ "min": "Valor mínimo", "mode": "Modo de visualización", "slider": "Control deslizante", - "step": "Tamaño del paso del control deslizante", + "step": "Tamaño del paso", "unit_of_measurement": "Unidad de medida" }, "input_select": { @@ -2256,7 +2256,7 @@ "edit_card": { "add": "Añadir tarjeta", "delete": "Eliminar tarjeta", - "duplicate": "Duplicar", + "duplicate": "Duplicar tarjeta", "edit": "Editar", "header": "Configuración de la tarjeta", "move": "Mover a la vista", @@ -2334,7 +2334,7 @@ "panel_mode": { "description": "Esto muestra la primera tarjeta a ancho completo; otras tarjetas en esta vista no se mostrarán.", "title": "¿Modo de panel?", - "warning_multiple_cards": "Esta vista contiene más de una tarjeta, pero la vista del panel solo puede mostrar 1 tarjeta." + "warning_multiple_cards": "Esta vista contiene más de una tarjeta, pero una vista de panel solo puede mostrar 1 tarjeta." } } }, diff --git a/translations/hu.json b/translations/hu.json index 296afabe72..84a5e4971d 100644 --- a/translations/hu.json +++ b/translations/hu.json @@ -23,7 +23,7 @@ "configurator": "Konfigurátor", "conversation": "Beszélgetés", "cover": "Borító", - "device_tracker": "Készülék nyomkövető", + "device_tracker": "Eszköz nyomkövető", "fan": "Ventilátor", "group": "Csoport", "hassio": "Hass.io", @@ -621,7 +621,7 @@ "dismiss": "Elvetés", "editor": { "confirm_delete": "Biztosan törölni szeretnéd ezt a bejegyzést?", - "delete": "TÖRLÉS", + "delete": "Törlés", "enabled_cause": "Letiltva. ({cause})", "enabled_description": "A letiltott entitások nem lesznek hozzáadva a Home Assistant-hoz.", "enabled_label": "Entitás engedélyezése", @@ -631,9 +631,9 @@ "name": "Név felülbírálása", "note": "Megjegyzés: lehet, hogy ez még nem működik minden integrációval.", "unavailable": "Ez az entitás jelenleg nem elérhető.", - "update": "FRISSÍTÉS" + "update": "Frissítés" }, - "no_unique_id": "Ez az entitás nem rendelkezik egyedi azonosítóval, ezért a beállítások nem kezelhetők a felhasználói felületről.", + "no_unique_id": "Ez az entitás nem rendelkezik egyedi azonosítóval, ezért a beállításai nem kezelhetők a felhasználói felületről.", "related": "Kapcsolatok", "settings": "Beállítások" }, @@ -655,7 +655,7 @@ "datetime": "Dátum és idő", "has_date": "Dátum", "has_time": "Idő", - "mode": "Mit szeretne megadni?", + "mode": "Mit szeretnél megadni?", "time": "Idő" }, "input_number": { @@ -664,7 +664,7 @@ "min": "Minimális érték", "mode": "Megjelenítési mód", "slider": "Csúszka", - "step": "A csúszka lépésmérete", + "step": "Lépés mérete", "unit_of_measurement": "Mértékegység" }, "input_select": { @@ -816,14 +816,14 @@ }, "description": "Az összes otthoni terület áttekintése", "editor": { - "create": "LÉTREHOZÁS", + "create": "Létrehozás", "default_name": "Új Terület", - "delete": "TÖRLÉS", - "update": "FRISSÍTÉS" + "delete": "Törlés", + "update": "Frissítés" }, "no_areas": "Úgy tűnik, nem hoztál még létre egy területet sem!", "picker": { - "create_area": "TERÜLET LÉTREHOZÁSA", + "create_area": "Terület létrehozása", "header": "Területek", "integrations_page": "Integrációk oldal", "introduction": "A területekkel az eszközök elhelyezkedés szerint rendszerezhetők. Ezen információk felhasználásával a Home Assistant segíteni tud előkészíteni a felületet, a jogosultságokat és az integrációt más rendszerekkel.", @@ -1310,6 +1310,7 @@ "automations": "Automatizálások", "cant_edit": "Kizárólag a felhasználói felületen létrehozott elemeket szerkesztheted.", "caption": "Eszközök", + "confirm_delete": "Biztosan törölni szeretnéd ezt az eszközt?", "confirm_rename_entity_ids": "Szeretnéd átnevezni az entitások ID-ját is?", "data_table": { "area": "Terület", @@ -1320,6 +1321,7 @@ "model": "Modell", "no_devices": "Nincsenek eszközök" }, + "delete": "Törlés", "description": "Csatlakoztatott eszközök kezelése", "details": "Itt található minden részlet az eszközről.", "device_not_found": "Eszköz nem található.", @@ -1394,7 +1396,7 @@ "remove_selected": { "button": "Kiválasztottak eltávolítása", "confirm_partly_title": "Csak {number} kiválasztott entitás távolítható el.", - "confirm_text": "Az entitások csak akkor távolíthatók el, ha az integráció már nem használja őket.", + "confirm_text": "El kell távolítanod őket a Lovelace konfigurációból és az automatizálásokból, ha tartalmazzák ezeket az entitásokat.", "confirm_title": "El szeretnél távolítani {number} entitást?" }, "selected": "{number} kiválasztva", @@ -1482,7 +1484,7 @@ "ignore": { "confirm_delete_ignore": "Ettől az integráció újra meg fog jelenni a felfedezett integrációk között a felfedezés során. Ehhez szükség lehet egy kis időre, vagy egy újraindításra.", "confirm_delete_ignore_title": "{name} mellőzésének visszavonása?", - "confirm_ignore": "Biztosan nem szeretnéd beállítani ezt az integrációt? Visszavonhatod a döntésed, ha kiválasztod a \"mellőzött integrációk megjelenítése\" menüpontot a jobb felső sarokban lévő menüben.", + "confirm_ignore": "Biztosan nem szeretnéd beállítani ezt az integrációt? Visszavonhatod a döntésed, ha kiválasztod a 'mellőzött integrációk megjelenítése' menüpontot a jobb felső sarokban lévő menüben.", "confirm_ignore_title": "{name} felfedezésének mellőzése?", "hide_ignored": "Mellőzött integrációk elrejtése", "ignore": "Mellőzés", @@ -1514,17 +1516,17 @@ "delete": "Törlés", "dismiss": "Bezárás", "edit_dashboard": "Irányítópult szerkesztése", - "icon": "Oldalsáv ikon", + "icon": "Ikon", "new_dashboard": "Új irányítópult hozzáadása", "remove_default": "Alapértelmezett beállítás visszavonása ezen az eszközön", "require_admin": "Csak adminisztrátor", "set_default": "Beállítás alapértelmezettként ezen az eszközön", "show_sidebar": "Megjelenítés az oldalsávon", - "title": "Oldalsáv cím", + "title": "Cím", "title_required": "Cím szükséges.", "update": "Frissítés", "url": "URL", - "url_error_msg": "Az URL nem tartalmazhat szóközt vagy speciális karaktereket, kivéve _ és -" + "url_error_msg": "Az URL-nek tartalmaznia kell egy kötőjelet, de nem tartalmazhat szóközt vagy speciális karaktereket, kivéve _ és -" }, "picker": { "add_dashboard": "Irányítópult hozzáadása", @@ -1586,7 +1588,7 @@ "delete": "Törlés", "device_tracker_intro": "Válaszd ki azokat az eszközöket, amelyek ehhez a felhasználóhoz tartoznak.", "device_tracker_pick": "Válassz egy követni kívánt eszközt", - "device_tracker_picked": "Eszköz követése", + "device_tracker_picked": "Eszköz nyomon követése", "link_integrations_page": "Integrációk oldal", "link_presence_detection_integrations": "Jelenlét-érzékelő Integrációk", "linked_user": "Csatolt felhasználó", @@ -1617,7 +1619,7 @@ "delete": "Entitás törlése", "device_entities": "Ha egy olyan entitást adsz hozzá, ami egy eszközhöz tartozik, akkor az eszköz is automatikusan hozzá lesz adva.", "header": "Entitások", - "introduction": "Itt lehet beállítani azokat az entitásokat, amelyek nem tartoznak eszközökhöz.", + "introduction": "Az eszköz nélküli entitások itt állíthatók be.", "without_device": "Eszköz nélküli entitások" }, "introduction": "Használj jeleneteket otthonod életre keltéséhez.", @@ -1757,7 +1759,7 @@ "cluster_commands": { "commands_of_cluster": "Kiválasztott klaszter parancsai", "header": "Klaszterparancsok", - "help_command_dropdown": "Válasszon egy parancsot, amellyel kapcsolatba lép", + "help_command_dropdown": "Válaszd ki a kommunikációs parancsot.", "introduction": "Klaszterparancsok megtekintése és kiadása.", "issue_zigbee_command": "Zigbee parancs kiadása" }, @@ -1857,15 +1859,15 @@ "name": "Név", "new_zone": "Új zóna", "passive": "Passzív", - "passive_note": "A passzív zónák az előlapon nem láthatóak, és nem használják helyként az eszköz keresők sem. Ez akkor hasznos, ha csak automatizáláshoz kívánja majd használni.", + "passive_note": "A passzív zónák nem láthatóak a frontenden, és nem használják helyként az eszköz nyomkövetők sem. Ez akkor lehet hasznos, ha csak automatizálásokhoz szeretnéd használni.", "radius": "Sugár", "required_error_msg": "Ez a mező kötelező", "update": "Frissítés" }, - "edit_home_zone": "Az otthona címét az általános konfigurációnál változtathatja meg.", - "edit_home_zone_narrow": "A otthoni zóna sugara még nem szerkeszthető a frontendről. A hely az általános konfigurációtól módosítható.", + "edit_home_zone": "Az otthoni zóna sugara egyelőre még nem szerkeszthető a frontendről. A mozgatásához húzd a jelölőt a térképen.", + "edit_home_zone_narrow": "Az otthoni zóna sugara egyelőre még nem szerkeszthető a frontendről. Az elhelyezkedése pedig az általános konfigurációnál módosítható.", "go_to_core_config": "Ugrás az általános konfigurációra?", - "home_zone_core_config": "Az otthoni zóna helye szerkeszthető az általános konfigurációs lapon. A Főzóna sugara még nem szerkeszthető a frontendről. Szeretné az általános konfigurációt?", + "home_zone_core_config": "Az otthoni zóna elhelyezkedése az általános konfigurációnál módosítható. A sugara egyelőre még nem szerkeszthető a frontendről. Szeretnél az általános konfigurációra ugrani?", "introduction": "A zónák lehetővé teszik a Föld bizonyos területeinek megadását. Ha egy személy egy zónán belül van, az állapota felveszi a zóna nevét. A zónák eseményindítóként vagy feltételként is használhatók az automatizálási beállításokon belül.", "no_zones_created_yet": "Úgy tűnik, még nem hoztál létre zónákat." }, @@ -2085,7 +2087,7 @@ } }, "changed_toast": { - "message": "A Lovelace konfiguráció módosítva lett, szeretnéd frissíteni az aktualizáláshoz?", + "message": "Az ehhez az irányítópulthoz tartozó Lovelace konfiguráció módosítva lett, szeretnél frissíteni az aktualizáláshoz?", "refresh": "Frissítés" }, "editor": { @@ -2105,6 +2107,7 @@ "conditional": { "card": "Kártya", "change_type": "Típus módosítása", + "condition_explanation": "A kártya akkor jelenik meg, ha az alábbi feltételek mindegyike teljesül.", "conditions": "Feltételek", "current_state": "jelenlegi", "description": "A Feltételes kártya egy másik kártyát jelenít meg entitások állapotától függően.", @@ -2117,6 +2120,7 @@ "required": "Szükséges" }, "entities": { + "description": "Az Entitások kártya a legalapvetőbb kártya. Az elemeket listákba csoportosítja.", "name": "Entitások", "show_header_toggle": "Fejléc kapcsoló megjelenítése?", "toggle": "Entitások váltása." @@ -2125,9 +2129,11 @@ "name": "Entitás gomb" }, "entity-filter": { + "description": "Az Entitásszűrő kártya lehetővé teszi azon entitások kilistázását, amelyek éppen egy bizonyos állapotban vannak.", "name": "Entitás szűrő" }, "gauge": { + "description": "A Mérőműszer kártya egy alapkártya, amely lehetővé teszi az érzékelők adatainak vizuális megtekintését.", "name": "Műszer", "severity": { "define": "Súlyosság meghatározása?", @@ -2151,6 +2157,7 @@ "maximum": "Maximum", "minimum": "Minimum", "name": "Név", + "no_theme": "Nincs téma", "refresh_interval": "Frissítési intervallum", "show_icon": "Ikon megjelenítése?", "show_name": "Név megjelenítése?", @@ -2164,9 +2171,11 @@ }, "glance": { "columns": "Oszlopok", + "description": "A Pillantás kártyával több érzékelő csoportosítható egy kompakt nézetbe.", "name": "Pillantás" }, "history-graph": { + "description": "Az Előzmény grafikon kártya lehetővé teszi az entitások múltbeli értékeinek grafikus megjelenítését.", "name": "Előzmény grafikon" }, "horizontal-stack": { @@ -2174,9 +2183,11 @@ "name": "Vízszintes Készlet" }, "iframe": { + "description": "A Weblap kártya lehetővé teszi a kedvenc weboldalad beágyazását a Home Assistant-ba.", "name": "Weboldal" }, "light": { + "description": "A Világítás kártya lehetővé teszi a fényerő megváltoztatását.", "name": "Világítás" }, "map": { @@ -2189,6 +2200,7 @@ }, "markdown": { "content": "Tartalom", + "description": "A Markdown kártya a Markdown szerkesztési módban megírt szövegek megjelenítésére szolgál.", "name": "Markdown" }, "media-control": { @@ -2262,7 +2274,7 @@ "tab_settings": "Beállítások", "tab_visibility": "Láthatóság", "visibility": { - "select_users": "Válaszd ki, hogy mely felhasználók láthatják ezt a nézetet a navigációban" + "select_users": "Válaszd ki, hogy mely felhasználók láthatják ezt a nézetet a navigációs sávon" } }, "header": "Felhasználói felület szerkesztése", @@ -2286,6 +2298,7 @@ "error_remove": "Nem lehet eltávolítani a konfigurációt: {error}", "error_save_yaml": "Nem sikerült menteni a YAML-t: {error}", "header": "Konfiguráció szerkesztése", + "resources_moved": "Az erőforrásokat ezentúl nem a Lovelace konfigurációban kell megadni, hanem a Lovelace konfigurációs panelben.", "save": "Mentés", "saved": "Mentett", "unsaved_changes": "Nem mentett változások" @@ -2308,7 +2321,8 @@ "view": { "panel_mode": { "description": "Ez az első kártyát teljes szélességében fogja megjeleníteni; a többi kártya nem lesz megjelenítve", - "title": "Panel mód?" + "title": "Panel mód?", + "warning_multiple_cards": "Ez a nézet több kártyát is tartalmaz, de a panelnézet csak 1 kártyát tud megjeleníteni." } } }, @@ -2338,6 +2352,7 @@ "views": { "confirm_delete": "Nézet törlése?", "confirm_delete_existing_cards": "A nézet törlésével a kártyák is eltávolításra kerülnek", + "confirm_delete_existing_cards_text": "Biztosan törölni szeretnéd a(z) '{name}' nézetet? A nézet {number} kártyát tartalmaz, melyek törlődni fognak. Ez a művelet nem vonható vissza.", "confirm_delete_text": "Biztosan törölni szeretnéd a(z) {name} nézetet?", "existing_cards": "Nem törölhetsz olyan nézetet, amely kártyákat tartalmaz. Először távolítsd el a kártyákat." }, diff --git a/translations/lb.json b/translations/lb.json index 9b933f6480..7746cd49b8 100644 --- a/translations/lb.json +++ b/translations/lb.json @@ -2265,7 +2265,10 @@ "move_right": "Usiicht no riets réckelen", "tab_badges": "Badgen", "tab_settings": "Astellungen", - "tab_visibility": "Visibilitéit" + "tab_visibility": "Visibilitéit", + "visibility": { + "select_users": "Wiel d'Benotzer aus déi dës Usiicht an der Navigatioun gesinn" + } }, "header": "UI änneren", "menu": { @@ -2312,7 +2315,8 @@ "view": { "panel_mode": { "description": "Dëst stellt déi éischt Kaart op voller Breet duer; aner Kaarte ginn net duergestallt.", - "title": "Panel Modus?" + "title": "Panel Modus?", + "warning_multiple_cards": "Dës Usiicht enthält méi wéi eng Kaart, mee eng Panneau Usiicht kann nëmmen 1 Kaart uweisen." } } }, @@ -2346,6 +2350,7 @@ "existing_cards": "Dir kënnt keng Usiicht mat Kaarten läschen. Läscht d'Kaarten fir d'éischt." }, "warning": { + "attribute_not_found": "Attribut {attribute} net disponibel an: {entity}", "entity_non_numeric": "Entitéit ass net numerescher Natur: {entity}", "entity_not_found": "Entitéit net erreechbar: {entity}" } From cc046478e58cec4e76491a8d2f77519d0f6bdf85 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Thu, 26 Mar 2020 02:47:12 -0700 Subject: [PATCH 44/66] Catch LL config not found exception in preload (#5340) --- src/entrypoints/core.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/entrypoints/core.ts b/src/entrypoints/core.ts index c4cb7808e7..b45eb5fb48 100644 --- a/src/entrypoints/core.ts +++ b/src/entrypoints/core.ts @@ -92,12 +92,12 @@ window.hassConnection.then(({ conn }) => { subscribeFrontendUserData(conn, "core", noop); if (location.pathname === "/" || location.pathname.startsWith("/lovelace/")) { - (window as WindowWithLovelaceProm).llConfProm = fetchConfig( - conn, - null, - false - ); - (window as WindowWithLovelaceProm).llResProm = fetchResources(conn); + const llWindow = window as WindowWithLovelaceProm; + llWindow.llConfProm = fetchConfig(conn, null, false); + llWindow.llConfProm.catch(() => { + // Ignore it, it is handled by Lovelace panel. + }); + llWindow.llResProm = fetchResources(conn); } }); From f514ea453c69e78d809c1595120169bf9c016ac1 Mon Sep 17 00:00:00 2001 From: Zack Arnett Date: Thu, 26 Mar 2020 06:13:13 -0400 Subject: [PATCH 45/66] Delete Card: Add Card Preview to Dialog (#5325) * Delete Card Dialog * Update with to be the max for a column * Comments * remove open and wait for render to resize I think * Review * fire event from dialog --- .../card-editor/hui-dialog-delete-card.ts | 111 ++++++++++++++++++ .../card-editor/show-delete-card-dialog.ts | 23 ++++ src/panels/lovelace/editor/delete-card.ts | 15 +-- src/translations/en.json | 4 +- src/util/toast-deleted-success.ts | 7 ++ 5 files changed, 152 insertions(+), 8 deletions(-) create mode 100644 src/panels/lovelace/editor/card-editor/hui-dialog-delete-card.ts create mode 100644 src/panels/lovelace/editor/card-editor/show-delete-card-dialog.ts create mode 100644 src/util/toast-deleted-success.ts diff --git a/src/panels/lovelace/editor/card-editor/hui-dialog-delete-card.ts b/src/panels/lovelace/editor/card-editor/hui-dialog-delete-card.ts new file mode 100644 index 0000000000..f1474cd03e --- /dev/null +++ b/src/panels/lovelace/editor/card-editor/hui-dialog-delete-card.ts @@ -0,0 +1,111 @@ +import { + css, + html, + LitElement, + TemplateResult, + CSSResultArray, + customElement, + property, + query, +} from "lit-element"; + +import "./hui-card-preview"; +import "../../../../components/dialog/ha-paper-dialog"; + +import deepFreeze from "deep-freeze"; + +// tslint:disable-next-line: no-duplicate-imports +import { HaPaperDialog } from "../../../../components/dialog/ha-paper-dialog"; +import { HomeAssistant } from "../../../../types"; +import { LovelaceCardConfig } from "../../../../data/lovelace"; +import { haStyleDialog } from "../../../../resources/styles"; +import { DeleteCardDialogParams } from "./show-delete-card-dialog"; +import { fireEvent } from "../../../../common/dom/fire_event"; + +@customElement("hui-dialog-delete-card") +export class HuiDialogDeleteCard extends LitElement { + @property() protected hass!: HomeAssistant; + @property() private _params?: DeleteCardDialogParams; + @property() private _cardConfig?: LovelaceCardConfig; + @query("ha-paper-dialog") private _dialog!: HaPaperDialog; + + public async showDialog(params: DeleteCardDialogParams): Promise { + this._params = params; + this._cardConfig = params.cardConfig; + if (!Object.isFrozen(this._cardConfig)) { + this._cardConfig = deepFreeze(this._cardConfig); + } + await this.updateComplete; + fireEvent(this._dialog as HTMLElement, "iron-resize"); + } + + protected render(): TemplateResult { + if (!this._params) { + return html``; + } + + return html` + +

+ ${this.hass.localize("ui.panel.lovelace.cards.confirm_delete")} +

+ + ${this._cardConfig + ? html` +
+ +
+ ` + : ""} +
+
+ + ${this.hass!.localize("ui.common.cancel")} + + + ${this.hass!.localize("ui.common.delete")} + +
+
+ `; + } + + static get styles(): CSSResultArray { + return [ + haStyleDialog, + css` + .element-preview { + position: relative; + } + hui-card-preview { + margin: 4px auto; + max-width: 500px; + display: block; + width: 100%; + } + `, + ]; + } + + private _close(): void { + this._params = undefined; + this._cardConfig = undefined; + } + + private _delete(): void { + if (!this._params?.deleteCard) { + return; + } + this._params.deleteCard(); + this._close(); + } +} + +declare global { + interface HTMLElementTagNameMap { + "hui-dialog-delete-card": HuiDialogDeleteCard; + } +} diff --git a/src/panels/lovelace/editor/card-editor/show-delete-card-dialog.ts b/src/panels/lovelace/editor/card-editor/show-delete-card-dialog.ts new file mode 100644 index 0000000000..6cfcf32e46 --- /dev/null +++ b/src/panels/lovelace/editor/card-editor/show-delete-card-dialog.ts @@ -0,0 +1,23 @@ +import { fireEvent } from "../../../../common/dom/fire_event"; +import { LovelaceCardConfig } from "../../../../data/lovelace"; + +export interface DeleteCardDialogParams { + deleteCard: () => void; + cardConfig?: LovelaceCardConfig; +} + +const importDeleteCardDialog = () => + import( + /* webpackChunkName: "hui-dialog-delete-card" */ "./hui-dialog-delete-card" + ); + +export const showDeleteCardDialog = ( + element: HTMLElement, + deleteCardDialogParams: DeleteCardDialogParams +): void => { + fireEvent(element, "show-dialog", { + dialogTag: "hui-dialog-delete-card", + dialogImport: importDeleteCardDialog, + dialogParams: deleteCardDialogParams, + }); +}; diff --git a/src/panels/lovelace/editor/delete-card.ts b/src/panels/lovelace/editor/delete-card.ts index 0d7baad0f5..04bada1b43 100644 --- a/src/panels/lovelace/editor/delete-card.ts +++ b/src/panels/lovelace/editor/delete-card.ts @@ -1,10 +1,9 @@ import { Lovelace } from "../types"; import { deleteCard } from "./config-util"; -import { - showAlertDialog, - showConfirmationDialog, -} from "../../../dialogs/generic/show-dialog-box"; +import { showAlertDialog } from "../../../dialogs/generic/show-dialog-box"; import { HomeAssistant } from "../../../types"; +import { showDeleteCardDialog } from "./card-editor/show-delete-card-dialog"; +import { showDeleteSuccessToast } from "../../../util/toast-deleted-success"; export async function confDeleteCard( element: HTMLElement, @@ -12,11 +11,13 @@ export async function confDeleteCard( lovelace: Lovelace, path: [number, number] ): Promise { - showConfirmationDialog(element, { - text: hass.localize("ui.panel.lovelace.cards.confirm_delete"), - confirm: async () => { + const cardConfig = lovelace.config.views[path[0]].cards![path[1]]; + showDeleteCardDialog(element, { + cardConfig, + deleteCard: async () => { try { await lovelace.saveConfig(deleteCard(lovelace.config, path)); + showDeleteSuccessToast(element, hass!); } catch (err) { showAlertDialog(element, { text: `Deleting failed: ${err.message}`, diff --git a/src/translations/en.json b/src/translations/en.json index b1b057d4dd..9307f0643d 100755 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -519,11 +519,13 @@ "common": { "loading": "Loading", "cancel": "Cancel", + "delete": "Delete", "close": "Close", "save": "Save", "yes": "Yes", "no": "No", - "successfully_saved": "Successfully saved" + "successfully_saved": "Successfully saved", + "successfully_deleted": "Successfully deleted" }, "components": { "entity": { diff --git a/src/util/toast-deleted-success.ts b/src/util/toast-deleted-success.ts new file mode 100644 index 0000000000..6dcf0da4a8 --- /dev/null +++ b/src/util/toast-deleted-success.ts @@ -0,0 +1,7 @@ +import { showToast } from "./toast"; +import { HomeAssistant } from "../types"; + +export const showDeleteSuccessToast = (el: HTMLElement, hass: HomeAssistant) => + showToast(el, { + message: hass!.localize("ui.common.successfully_deleted"), + }); From 1e3950cd1d64b744971450e192fde53364d8eb06 Mon Sep 17 00:00:00 2001 From: Zack Arnett Date: Thu, 26 Mar 2020 06:32:40 -0400 Subject: [PATCH 46/66] Add shopping list (#5339) --- src/fake_data/demo_config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fake_data/demo_config.ts b/src/fake_data/demo_config.ts index 91e7080771..63b0d49319 100644 --- a/src/fake_data/demo_config.ts +++ b/src/fake_data/demo_config.ts @@ -11,7 +11,7 @@ export const demoConfig: HassConfig = { temperature: "°C", volume: "L", }, - components: ["notify.html5", "history"], + components: ["notify.html5", "history", "shopping_list"], time_zone: "America/Los_Angeles", config_dir: "/config", version: "DEMO", From 59e89a0daf7a4c4caa28ddf3b025e1bf76a96809 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Thu, 26 Mar 2020 11:39:01 +0100 Subject: [PATCH 47/66] Sandbox iframe --- src/panels/lovelace/cards/hui-iframe-card.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/panels/lovelace/cards/hui-iframe-card.ts b/src/panels/lovelace/cards/hui-iframe-card.ts index bd8d0b2d27..cde2052130 100644 --- a/src/panels/lovelace/cards/hui-iframe-card.ts +++ b/src/panels/lovelace/cards/hui-iframe-card.ts @@ -77,7 +77,11 @@ export class HuiIframeCard extends LitElement implements LovelaceCard { "padding-top": padding, })}" > - +
`; From 61ac8318823c5e5c91c9424147e9c5521c09a438 Mon Sep 17 00:00:00 2001 From: HomeAssistant Azure Date: Fri, 27 Mar 2020 00:33:27 +0000 Subject: [PATCH 48/66] [ci skip] Translation update --- translations/en.json | 2 + translations/fa.json | 1 + translations/is.json | 102 ++++++++++++++++++++++++++++++++++++++++++- translations/lb.json | 5 +++ 4 files changed, 109 insertions(+), 1 deletion(-) diff --git a/translations/en.json b/translations/en.json index 153c990ef2..4a1aa9dd16 100644 --- a/translations/en.json +++ b/translations/en.json @@ -537,9 +537,11 @@ "common": { "cancel": "Cancel", "close": "Close", + "delete": "Delete", "loading": "Loading", "no": "No", "save": "Save", + "successfully_deleted": "Successfully deleted", "successfully_saved": "Successfully saved", "yes": "Yes" }, diff --git a/translations/fa.json b/translations/fa.json index a37f26e9e4..f63f20f090 100644 --- a/translations/fa.json +++ b/translations/fa.json @@ -752,6 +752,7 @@ }, "customize": { "picker": { + "header": "سفارشی سازی ها", "introduction": "نویسه ویژگی های هر سازمانی. سفارشی سازی اضافه شده / ویرایش شده فورا اثر می کند. سفارشی های حذف شده هنگامی که موجودیت به روز می شود اثر می کند." } }, diff --git a/translations/is.json b/translations/is.json index c4326c8e77..982f141224 100644 --- a/translations/is.json +++ b/translations/is.json @@ -517,6 +517,12 @@ "yes": "Já" }, "components": { + "area-picker": { + "add_dialog": { + "add": "Bæta við", + "name": "Nafn" + } + }, "device-picker": { "clear": "Hreinsa", "device": "Tæki", @@ -558,6 +564,29 @@ "ok": "Í lagi", "title": "Ertu viss?" }, + "entity_registry": { + "editor": { + "delete": "Eyða", + "update": "Uppfæra" + } + }, + "generic": { + "cancel": "Hætta við", + "close": "loka", + "ok": "Í lagi" + }, + "helper_settings": { + "generic": { + "name": "Nafn" + }, + "input_select": { + "add": "Bæta við" + }, + "input_text": { + "password": "Lykilorð", + "text": "Texti" + } + }, "more_info_control": { "script": { "last_action": "Síðasta aðgerð" @@ -1022,14 +1051,21 @@ "battery": "Rafhlaða", "device": "Tæki", "integration": "Samþætting", - "manufacturer": "Framleiðandi" + "manufacturer": "Framleiðandi", + "no_devices": "Engin tæki" }, + "delete": "Eyða", "description": "Stjórna tengdum tækjum", "device_not_found": "Tæki fannst ekki.", "entities": { "entities": "Einingar" }, "info": "Upplýsingar um tæki", + "scene": { + "no_scenes": "Engar senur", + "scenes": "Senur" + }, + "scenes": "Senur", "unknown_error": "Óþekkt villa", "unnamed_device": "Ónefnt tæki" }, @@ -1074,6 +1110,20 @@ } }, "header": "Stilla af Home Assistant", + "helpers": { + "dialog": { + "create": "Stofna" + }, + "picker": { + "headers": { + "name": "Nafn", + "type": "Gerð" + } + }, + "types": { + "input_text": "Texti" + } + }, "integrations": { "caption": "Samþættingar", "config_entry": { @@ -1118,6 +1168,38 @@ "none": "Ekkert skilgreint sem stendur" }, "introduction": "Hér er mögulegt að stilla af íhluti og Home Assistant. Því miður er ekki hægt að breyta öllu í gegnum viðmótið ennþá, en við erum að vinna í því.", + "lovelace": { + "dashboards": { + "detail": { + "create": "Stofna", + "delete": "Eyða", + "dismiss": "Loka", + "title": "Titill", + "update": "Uppfæra" + }, + "picker": { + "headers": { + "default": "Sjálfgefið", + "filename": "Skráarnafn", + "title": "Titill" + }, + "open": "Opna" + } + }, + "resources": { + "detail": { + "create": "Stofna", + "delete": "Eyða", + "dismiss": "Loka", + "update": "Uppfæra" + }, + "picker": { + "headers": { + "type": "Gerð" + } + } + } + }, "person": { "add_person": "Bæta við persónu", "caption": "Persónur", @@ -1287,6 +1369,14 @@ "updateDeviceName": "Stilltu sérsniðið heiti fyrir þetta tæki í tækjaskránni." } }, + "zone": { + "detail": { + "create": "Stofna", + "delete": "Eyða", + "name": "Nafn", + "update": "Uppfæra" + } + }, "zwave": { "caption": "Z-Wave", "common": { @@ -1381,6 +1471,9 @@ "toggle": "Víxla {name}", "url": "Opna glugga á {url_path}" }, + "safe-mode": { + "show_errors": "Sýna villur" + }, "shopping-list": { "add_item": "Bæta við hlut", "checked_items": "Valdir hlutir", @@ -1399,6 +1492,12 @@ "alarm-panel": { "available_states": "Tiltækar stöður" }, + "button": { + "name": "Hnappur" + }, + "conditional": { + "conditions": "Skilyrði" + }, "config": { "optional": "Valfrjálst", "required": "Skilyrt" @@ -1523,6 +1622,7 @@ }, "save_config": { "cancel": "Gleymdu þessu", + "close": "Loka", "header": "Taka yfir stjórn á Lovelace viðmótinu", "para": "Home Assistant mun sjálfgefið halda utan um notendaviðmótið og uppfæra það þegar nýjar einingar eða Lovlace íhlutir verða aðgengilegir. Ef þú tekur yfir stjórn á viðmótinu þá mun þetta ekki gerast sjálfkrafa fyrir þig.", "para_sure": "Ertu viss um að þú viljir taka yfir stjórn á notendaviðmótinu þínu?", diff --git a/translations/lb.json b/translations/lb.json index 7746cd49b8..dd4b3f3d76 100644 --- a/translations/lb.json +++ b/translations/lb.json @@ -2143,6 +2143,7 @@ "icon_height": "Héicht vun der Ikon", "image": "Wee zum Bild", "manual": "Manuell", + "manual_description": "Muss Du eng personaliséiert Kaart bäifügen oder wëlls de Yaml manuell schreiwen?", "maximum": "Maximum", "minimum": "Minimum", "name": "Numm", @@ -2163,6 +2164,7 @@ "name": "Usiicht" }, "history-graph": { + "description": "D'Verlaf's Grafik Kaart erlaabt Iech eng Grafik fir all eenzel opgelëschten Entitéiten unzeweisen.", "name": "Verlaf Diagramm" }, "horizontal-stack": { @@ -2195,6 +2197,7 @@ "name": "Medie Kontroll" }, "picture-elements": { + "description": "D'Picture Elements Kaart ass eng vun de villsäitegsten Aarte vu Kaarten. D'Kaarten erlaben Iech Ikonen oder Text ze positionéieren a souguer Servicer! Op engem Bild wat op Koordinate baséiert.", "name": "Biller Elementer" }, "picture-entity": { @@ -2202,9 +2205,11 @@ "name": "Biller Entitéit" }, "picture-glance": { + "description": "D'Picture Glance Kaart weist e Bild an entspriechend Entitéiten Zoustänn als Ikon un. D'Entitéiten op der rietser Säit erlaben et Aktiounen auszeféieren, oder anerer weise méi Informatioun un.", "name": "Biller Usiicht" }, "picture": { + "description": "D'Foto Kaart erlaabt Iech e Bild ze setze fir als Navigatioun ze benotze fir op verschidde Weeër an Ärem Interface oder e Service op ze ruffen.", "name": "Bild" }, "plant-status": { From 554c0b692d393dc18c37e7abb28c5e178b0d14e2 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Fri, 27 Mar 2020 19:55:55 +0100 Subject: [PATCH 49/66] Fix supervisor panel (#5348) * Fix supervisor panel * Lint Co-authored-by: Paulus Schoutsen --- hassio/src/addon-view/hassio-addon-info.ts | 6 +++--- hassio/src/dashboard/hassio-update.ts | 14 +++++++------- hassio/src/system/hassio-host-info.ts | 6 ++---- hassio/src/system/hassio-supervisor-info.ts | 4 ++-- src/data/hassio/addon.ts | 2 +- src/data/hassio/host.ts | 2 +- src/data/hassio/supervisor.ts | 2 +- 7 files changed, 17 insertions(+), 19 deletions(-) diff --git a/hassio/src/addon-view/hassio-addon-info.ts b/hassio/src/addon-view/hassio-addon-info.ts index 95503c23fe..cc2bf2e0bf 100644 --- a/hassio/src/addon-view/hassio-addon-info.ts +++ b/hassio/src/addon-view/hassio-addon-info.ts @@ -107,7 +107,7 @@ class HassioAddonInfo extends LitElement {
@@ -636,7 +636,7 @@ class HassioAddonInfo extends LitElement { this.addon && !this.addon.detached && this.addon.version && - this.addon.version !== this.addon.last_version + this.addon.version !== this.addon.version_latest ); } diff --git a/hassio/src/dashboard/hassio-update.ts b/hassio/src/dashboard/hassio-update.ts index a48c558b86..d04ed1854a 100644 --- a/hassio/src/dashboard/hassio-update.ts +++ b/hassio/src/dashboard/hassio-update.ts @@ -40,8 +40,8 @@ export class HassioUpdate extends LitElement { ].filter((value) => { return ( !!value && - (value.last_version - ? value.version !== value.last_version + (value.version_latest + ? value.version !== value.version_latest : value.version_latest ? value.version !== value.version_latest : false) @@ -68,26 +68,26 @@ export class HassioUpdate extends LitElement { ${this._renderUpdateCard( "Home Assistant Core", this.hassInfo.version, - this.hassInfo.last_version, + this.hassInfo.version_latest, "hassio/homeassistant/update", `https://${ - this.hassInfo.last_version.includes("b") ? "rc" : "www" + this.hassInfo.version_latest.includes("b") ? "rc" : "www" }.home-assistant.io/latest-release-notes/`, "hassio:home-assistant" )} ${this._renderUpdateCard( "Supervisor", this.supervisorInfo.version, - this.supervisorInfo.last_version, + this.supervisorInfo.version_latest, "hassio/supervisor/update", - `https://github.com//home-assistant/hassio/releases/tag/${this.supervisorInfo.last_version}` + `https://github.com//home-assistant/hassio/releases/tag/${this.supervisorInfo.version_latest}` )} ${this.hassOsInfo ? this._renderUpdateCard( "Operating System", this.hassOsInfo.version, this.hassOsInfo.version_latest, - "hassio/hassos/update", + "hassio/os/update", `https://github.com//home-assistant/hassos/releases/tag/${this.hassOsInfo.version_latest}` ) : ""} diff --git a/hassio/src/system/hassio-host-info.ts b/hassio/src/system/hassio-host-info.ts index bdaaecbcfa..3c50ece8af 100644 --- a/hassio/src/system/hassio-host-info.ts +++ b/hassio/src/system/hassio-host-info.ts @@ -100,7 +100,7 @@ class HassioHostInfo extends LitElement { Import from USB @@ -108,9 +108,7 @@ class HassioHostInfo extends LitElement { : ""} ${this.hostInfo.version !== this.hostInfo.version_latest ? html` - Update ` diff --git a/hassio/src/system/hassio-supervisor-info.ts b/hassio/src/system/hassio-supervisor-info.ts index 09364b4233..75892b731b 100644 --- a/hassio/src/system/hassio-supervisor-info.ts +++ b/hassio/src/system/hassio-supervisor-info.ts @@ -41,7 +41,7 @@ class HassioSupervisorInfo extends LitElement { Latest version - ${this.supervisorInfo.last_version} + ${this.supervisorInfo.version_latest} ${this.supervisorInfo.channel !== "stable" ? html` @@ -63,7 +63,7 @@ class HassioSupervisorInfo extends LitElement { Reload - ${this.supervisorInfo.version !== this.supervisorInfo.last_version + ${this.supervisorInfo.version !== this.supervisorInfo.version_latest ? html` { return hassioApiResultExtractor( await hass.callApi>( "GET", - "hassio/hassos/info" + "hassio/os/info" ) ); }; diff --git a/src/data/hassio/supervisor.ts b/src/data/hassio/supervisor.ts index 166cea837f..bed2c34d0a 100644 --- a/src/data/hassio/supervisor.ts +++ b/src/data/hassio/supervisor.ts @@ -23,7 +23,7 @@ export const fetchHassioHomeAssistantInfo = async (hass: HomeAssistant) => { return hassioApiResultExtractor( await hass.callApi>( "GET", - "hassio/homeassistant/info" + "hassio/core/info" ) ); }; From 30a38fa6d1ec1b1d5f9d796d362d7e5a5b18721f Mon Sep 17 00:00:00 2001 From: HomeAssistant Azure Date: Sat, 28 Mar 2020 00:34:07 +0000 Subject: [PATCH 50/66] [ci skip] Translation update --- translations/ca.json | 2 ++ translations/de.json | 56 ++++++++++++++++++++------------------- translations/es.json | 44 +++++++++++++++--------------- translations/fr.json | 2 ++ translations/it.json | 8 +++++- translations/lb.json | 6 +++++ translations/ru.json | 2 ++ translations/sk.json | 3 +++ translations/zh-Hant.json | 2 ++ 9 files changed, 76 insertions(+), 49 deletions(-) diff --git a/translations/ca.json b/translations/ca.json index 3ae4d6ebb3..4d88efc6e3 100644 --- a/translations/ca.json +++ b/translations/ca.json @@ -537,9 +537,11 @@ "common": { "cancel": "Cancel·la", "close": "Tanca", + "delete": "Suprimeix", "loading": "Carregant", "no": "No", "save": "Desa", + "successfully_deleted": "S'ha suprimit correctament", "successfully_saved": "S'ha desat correctament", "yes": "Sí" }, diff --git a/translations/de.json b/translations/de.json index eb8bb14948..7cde64535b 100644 --- a/translations/de.json +++ b/translations/de.json @@ -537,9 +537,11 @@ "common": { "cancel": "Abbrechen", "close": "Schließen", + "delete": "Löschen", "loading": "Laden", "no": "Nein", "save": "Speichern", + "successfully_deleted": "Erfolgreich gelöscht", "successfully_saved": "Erfolgreich gespeichert", "yes": "Ja" }, @@ -620,7 +622,7 @@ "control": "Steuerung", "dismiss": "Ausblenden", "editor": { - "confirm_delete": "Möchtest Du diesen Eintrag wirklich löschen?", + "confirm_delete": "Möchtest du diesen Eintrag wirklich löschen?", "delete": "Löschen", "enabled_cause": "Deaktiviert durch {cause}.", "enabled_description": "Deaktivierte Entitäten werden nicht zu Home Assistant hinzugefügt.", @@ -811,7 +813,7 @@ "caption": "Bereichsregister", "create_area": "BEREICH ERSTELLEN", "delete": { - "confirmation_text": "Alle Geräte in diesem Bereich werden nicht zugewiesen.", + "confirmation_text": "Alle Geräte in diesem Bereich werden nicht mehr zugewiesen sein.", "confirmation_title": "Möchtest du diesen Bereich wirklich löschen?" }, "description": "Überblick über alle Bereiche in Deinem Haus.", @@ -1272,9 +1274,9 @@ }, "customize": { "attributes_customize": "Folgende Attribute sind bereits in customize.yaml gesetzt", - "attributes_not_set": "Die folgenden Attribute wurden nicht gesetzt. Setzen Sie sie, wenn Sie möchten.", + "attributes_not_set": "Die folgenden Attribute wurden nicht gesetzt. Setze sie, wenn du möchtest.", "attributes_outside": "Die folgenden Attribute werden außerhalb von customize.yaml angepasst.", - "attributes_override": "Sie können sie überschreiben, wenn Sie möchten.", + "attributes_override": "Du kannst sie überschreiben, wenn du möchtest.", "attributes_set": "Die folgenden Attribute der Entität sind programmatisch festgelegt.", "caption": "Anpassung", "description": "Elemente anpassen", @@ -1286,7 +1288,7 @@ }, "warning": { "include_link": "binde customize.yaml ein", - "include_sentence": "Es scheint, dass Deine configuration.yaml nicht korrekt ist.", + "include_sentence": "Es scheint, dass deine configuration.yaml nicht korrekt ist.", "not_applied": "Die hier vorgenommenen Änderungen werden eingetragen, aber erst nach einem erneuten Laden der Konfiguration angewendet, wenn das Include vorhanden ist." } }, @@ -1310,7 +1312,7 @@ "automations": "Automatisierungen", "cant_edit": "Du kannst nur Elemente bearbeiten, die in der Benutzeroberfläche erstellt wurden.", "caption": "Geräte", - "confirm_delete": "Möchten Sie dieses Gerät wirklich löschen?", + "confirm_delete": "Möchtest Du dieses Gerät wirklich löschen?", "confirm_rename_entity_ids": "Möchten Sie auch die Entitäts-IDs Ihrer Entitäten umbenennen?", "data_table": { "area": "Bereich", @@ -1368,7 +1370,7 @@ "picker": { "disable_selected": { "button": "Ausgewählte deaktivieren", - "confirm_text": "Deaktivierte Entitäten werden Home Assistant nicht hinzugefügt.", + "confirm_text": "Deaktivierte Entitäten werden zu Home Assistant nicht hinzugefügt.", "confirm_title": "Möchtest du {number} Entitäten deaktivieren?" }, "enable_selected": { @@ -1471,7 +1473,7 @@ }, "failed_create_area": "Der Bereich konnte nicht erstellt werden.", "finish": "Fertig", - "loading_first_time": "Bitte warten Sie, während die Integration installiert wird", + "loading_first_time": "Bitte warten, während die Integration installiert wird", "name_new_area": "Name des neuen Bereichs?", "not_all_required_fields": "Nicht alle Pflichtfelder sind ausgefüllt.", "submit": "Absenden" @@ -1526,7 +1528,7 @@ "title": "Titel der Seitenleiste", "title_required": "Titel ist erforderlich.", "update": "Aktualisieren", - "url": "Url", + "url": "URL", "url_error_msg": "Die URL sollte ein - enthalten und darf keine Leerzeichen oder Sonderzeichen enthalten, außer _ und -" }, "picker": { @@ -1554,7 +1556,7 @@ "new_resource": "Neue Ressource hinzufügen", "type": "Ressource-Typ", "update": "Aktualisieren", - "url": "Url", + "url": "URL", "url_error_msg": "URL ist ein Pflichtfeld", "warning_header": "Sei vorsichtig!", "warning_text": "Das Hinzufügen von Ressourcen kann gefährlich sein. Stelle sicher, dass du die Quelle der Ressource kennst und ihr vertraust. Schlechte Ressourcen können dein System ernsthaft beschädigen." @@ -1563,7 +1565,7 @@ "add_resource": "Ressource hinzufügen", "headers": { "type": "Typ", - "url": "Url" + "url": "URL" }, "no_resources": "keine Ressourcen" }, @@ -1623,7 +1625,7 @@ "introduction": "Entitäten, die nicht zu einem Gerät gehören, können hier festgelegt werden.", "without_device": "Entitäten ohne Gerät" }, - "introduction": "Benutzen Sie Szenen, um Ihrem Zuhause Leben einzuhauchen.", + "introduction": "Benutze Szenen um deinem Zuhause Leben einzuhauchen.", "load_error_not_editable": "Nur Szenen in der scenes.yaml sind editierbar.", "load_error_unknown": "Fehler beim Laden der Szene ({err_no}).", "name": "Name", @@ -1786,14 +1788,14 @@ "header": "Zigbee Home Automation - Gerät" }, "group_binding": { - "bind_button_help": "Binden Sie die ausgewählte Gruppe an die ausgewählten Geräte-Cluster.", + "bind_button_help": "Binde die ausgewählte Gruppe an die ausgewählten Geräte-Cluster.", "bind_button_label": "Gruppe binden", - "cluster_selection_help": "Wählen Sie Cluster aus, die an die ausgewählte Gruppe gebunden werden sollen.", + "cluster_selection_help": "Wähle einen Cluster aus, die an die ausgewählte Gruppe gebunden werden sollen.", "group_picker_help": "Wähle eine Gruppe aus, um einen Bindungsbefehl zu erteilen.", "group_picker_label": "Bindbare Gruppen", "header": "Gruppenbindung", "introduction": "Binden und Aufheben der Bindung von Gruppen.", - "unbind_button_help": "Trennen Sie die Bindung der ausgewählten Gruppe von den ausgewählten Geräte-Clustern.", + "unbind_button_help": "Trenne die Bindung der ausgewählten Gruppe von den ausgewählten Geräte-Clustern.", "unbind_button_label": "Gruppe auflösen" }, "groups": { @@ -1849,7 +1851,7 @@ "configured_in_yaml": "Zonen, die über configuration.yaml konfiguriert wurden, können nicht über die Benutzeroberfläche bearbeitet werden.", "confirm_delete": "Möchtest du diesen Bereich wirklich löschen?", "create_zone": "Zone erstellen", - "description": "Verwalte die Zonen, in denen du Personen verfolgen möchten.", + "description": "Verwalte die Zonen, in denen du Personen verfolgen möchtest.", "detail": { "create": "Erstellen", "delete": "Löschen", @@ -1866,7 +1868,7 @@ "update": "Aktualisieren" }, "edit_home_zone": "Der Radius der Home-Zone kann noch nicht über das Frontend bearbeitet werden. Ziehe die Markierung auf der Karte, um die Heimatzone zu verschieben.", - "edit_home_zone_narrow": "Der Radius der Home-Zone kann vom Frontend aus noch nicht bearbeitet werden. Der Standort kann von der allgemeinen Konfiguration aus geändert werden.", + "edit_home_zone_narrow": "Der Radius der Home-Zone kann noch nicht vom Frontend aus bearbeitet werden. Der Standort kann von der allgemeinen Konfiguration aus geändert werden.", "go_to_core_config": "Zur allgemeinen Konfiguration gehen?", "home_zone_core_config": "Der Standort deiner Homezone kann auf der allgemeinen Konfigurationsseite bearbeitet werden. Der Radius der Homezone kann vom Frontend aus noch nicht bearbeitet werden. Möchtest du zur allgemeinen Konfiguration gehen?", "introduction": "Mit Zonen kannst du bestimmte Regionen auf der Erde angeben. Befindet sich eine Person in einer Zone, übernimmt der Zustand den Namen aus der Zone. Zonen können auch als Auslöser oder Bedingung in Automatisierungs-Setups verwendet werden.", @@ -1930,7 +1932,7 @@ "external_panel": { "complete_access": "Es wird Zugriff auf alle Daten in Home Assistant haben.", "hide_message": "Überprüfe die Dokumentation für die panel_custom Komponente, um diese Meldung auszublenden.", - "question_trust": "Vertrauen Sie dem externen Panel {name} unter {link}?" + "question_trust": "Vertraust du dem externen Panel {name} unter {link}?" } }, "developer-tools": { @@ -2053,7 +2055,7 @@ }, "lovelace": { "add_entities": { - "generated_unsupported": "Sie können diese Funktion nur verwenden, wenn Sie die Kontrolle über Lovelace übernommen haben.", + "generated_unsupported": "Du kannst diese Funktion nur verwenden, wenn du die Kontrolle über Lovelace übernommen hast.", "saving_failed": "Speichern der Lovelace-Konfiguration ist fehlgeschlagen.", "yaml_unsupported": "Du kannst diese Funktion nicht verwenden, wenn du Lovelace im YAML-Modus verwendest." }, @@ -2102,7 +2104,7 @@ "name": "Alarmpanel" }, "button": { - "description": "Mit der Schaltflächen-Karte können Sie Schaltflächen hinzufügen, um Aufgaben auszuführen.", + "description": "Mit der Schaltflächen-Karte kannst du Schaltflächen hinzufügen, um Aufgaben auszuführen.", "name": "Schaltfläche" }, "conditional": { @@ -2155,7 +2157,7 @@ "icon_height": "Symbol Höhe", "image": "Bildpfad", "manual": "Manuell", - "manual_description": "Möchtest du eine benutzerdefinierte Karte hinzufügen oder den Yaml-Code von Hand bearbeiten?", + "manual_description": "Möchtest du eine benutzerdefinierte Karte hinzufügen, oder den Yaml-Code von Hand bearbeiten?", "maximum": "Maximum", "minimum": "Minimum", "name": "Name", @@ -2210,11 +2212,11 @@ "name": "Mediensteuerung" }, "picture-elements": { - "description": "Die Bilder-Karte ist eine der vielseitigsten Arten von Karten. Mit den Karten kannst du Symbole oder Text und sogar Dienste positionieren! Auf einem Bild basierend auf Koordinaten.", + "description": "Die Bilder-Karte ist eine der vielseitigsten Arten von Karten. Mit den Karten kannst du Symbole, Text und sogar Dienste positionieren! Auf einem Bild basierend auf Koordinaten.", "name": "Picture Elements" }, "picture-entity": { - "description": "Die Bilder-Karte zeigt eine Entität in Form eines Bildes an. Anstelle von Bildern aus der URL kann auch das Bild von Kamera-entitäten angezeigt werden.", + "description": "Die Bilder-Karte zeigt eine Entität in Form eines Bildes an. Anstelle von Bildern aus der URL kann auch das Bild von Kamera-Entitäten angezeigt werden.", "name": "Picture Entity" }, "picture-glance": { @@ -2222,7 +2224,7 @@ "name": "Picture Glance" }, "picture": { - "description": "Mit der Bildkarte kannst du ein Bild festlegen, das für die Navigation zu verschiedenen Pfaden in Ihrer Benutzeroberfläche oder zum Aufrufen eines Dienstes verwendet werden soll.", + "description": "Mit der Bildkarte kannst du ein Bild festlegen, das für die Navigation zu verschiedenen Pfaden in deiner Benutzeroberfläche oder zum Aufrufen eines Dienstes verwendet werden soll.", "name": "Picture" }, "plant-status": { @@ -2230,7 +2232,7 @@ "name": "Pflanzen Status" }, "sensor": { - "description": "Die Sensorkarte gibt Ihnen einen schnellen Überblick über Ihren Sensorstatus mit einem optionalen Diagramm, um Änderungen im Zeitverlauf zu visualisieren.", + "description": "Die Sensorkarte gibt dir einen schnellen Überblick über Ihren Sensorstatus mit einem optionalen Diagramm, um Änderungen im Zeitverlauf zu visualisieren.", "graph_detail": "Diagrammdetail", "graph_type": "Typ", "name": "Sensor" @@ -2349,8 +2351,8 @@ }, "reload_lovelace": "Benutzeroberfläche neu laden", "reload_resources": { - "refresh_body": "Sie müssen die Seite aktualisieren, um das Neuladen abzuschließen. Möchten Sie jetzt aktualisieren?", - "refresh_header": "Möchtest du aktualisieren?" + "refresh_body": "Du musst die Seite aktualisieren, um das Neuladen abzuschließen. Möchtest Du sie jetzt aktualisieren?", + "refresh_header": "Möchtest Du aktualisieren?" }, "unused_entities": { "available_entities": "Dies sind die Entitäten, die Sie zur Verfügung haben, die aber noch nicht in Ihrer Lovelace-Benutzeroberfläche enthalten sind.", diff --git a/translations/es.json b/translations/es.json index 99be8490c8..bc2da03a03 100644 --- a/translations/es.json +++ b/translations/es.json @@ -50,7 +50,7 @@ "sensor": "Sensor", "sun": "Sol", "switch": "Interruptor", - "system_health": "Salud del sistema", + "system_health": "Estado del Sistema", "updater": "Actualizador", "vacuum": "Aspiradora", "weblink": "Enlace web", @@ -537,9 +537,11 @@ "common": { "cancel": "Cancelar", "close": "Cerrar", + "delete": "Eliminar", "loading": "Cargando", "no": "No", "save": "Guardar", + "successfully_deleted": "Eliminado correctamente", "successfully_saved": "Guardado correctamente", "yes": "Sí" }, @@ -842,7 +844,7 @@ "duplicate": "Duplicar", "header": "Acciones", "introduction": "Las acciones son lo que hará Home Assistant cuando se desencadene la automatización.", - "learn_more": "Aprende más sobre las acciones.", + "learn_more": "Saber más sobre las acciones.", "name": "Acción", "type_select": "Tipo de acción", "type": { @@ -887,7 +889,7 @@ "duplicate": "Duplicar", "header": "Condiciones", "introduction": "Las condiciones son opcionales e impedirán cualquier\nejecución posterior a menos que se cumplan todas las condiciones.", - "learn_more": "Aprende más sobre las condiciones", + "learn_more": "Saber más sobre las condiciones", "name": "Condición", "type_select": "Tipo de condición", "type": { @@ -960,7 +962,7 @@ "duplicate": "Duplicar", "header": "Desencadenantes", "introduction": "Los desencadenantes son los que inician el funcionamiento de una regla de automatización. Es posible especificar varios desencadenantes para la misma regla. Una vez que se inicia un desencadenante, Home Assistant comprobará las condiciones, si las hubiere, y ejecutará la acción.", - "learn_more": "Aprende más sobre los desencadenantes", + "learn_more": "Saber más sobre los desencadenantes", "name": "Desencadenante", "type_select": "Tipo de desencadenante", "type": { @@ -1053,7 +1055,7 @@ "edit_automation": "Editar automatización", "header": "Editor de automatización", "introduction": "El editor de automatización te permite crear y editar automatizaciones. En el enlace siguiente puedes leer las instrucciones para asegurarte de que has configurado correctamente Home Assistant.", - "learn_more": "Aprende más sobre las automatizaciones", + "learn_more": "Saber más sobre las automatizaciones", "no_automations": "No pudimos encontrar ninguna automatización editable", "only_editable": "Solo las automatizaciones definidas en automations.yaml son editables.", "pick_automation": "Elije la automatización para editar", @@ -1108,7 +1110,7 @@ "info": "Home Assistant Cloud proporciona una conexión remota segura a tu instancia mientras estás fuera de casa.", "instance_is_available": "Tu instancia está disponible en", "instance_will_be_available": "Tu instancia estará disponible en", - "link_learn_how_it_works": "Aprende cómo funciona", + "link_learn_how_it_works": "Aprender cómo funciona", "title": "Control remoto" }, "sign_out": "Cerrar sesión", @@ -1116,7 +1118,7 @@ "webhooks": { "disable_hook_error_msg": "No se pudo deshabilitar el webhook:", "info": "Cualquier cosa que esté configurada para ser activada por un webhook puede recibir una URL de acceso público para permitirte enviar datos a Home Assistant desde cualquier lugar, sin exponer tu instancia a Internet.", - "link_learn_more": "Aprende más sobre la creación de automatizaciones basadas en webhook.", + "link_learn_more": "Saber más sobre la creación de automatizaciones basadas en webhook.", "loading": "Cargando ...", "manage": "Administrar", "no_hooks_yet": "Parece que aún no tienes webhooks. Comienza configurando un", @@ -1184,7 +1186,7 @@ "introduction2": "Este servicio está a cargo de nuestro socio.", "introduction2a": ", una compañía fundada por los fundadores de Home Assistant y Hass.io.", "introduction3": "Home Assistant Cloud es un servicio de suscripción con una prueba gratuita de un mes. No se necesita información de pago.", - "learn_more_link": "Aprende más sobre Home Assistant Cloud", + "learn_more_link": "Saber más sobre Home Assistant Cloud", "password": "Contraseña", "password_error_msg": "Las contraseñas tienen al menos 8 caracteres.", "sign_in": "Inicia sesión", @@ -1583,7 +1585,7 @@ "confirm_delete": "¿Estás seguro de que deseas eliminar a esta persona?", "confirm_delete2": "Todos los dispositivos que pertenecen a esta persona quedarán sin asignar.", "create_person": "Crear persona", - "description": "Gestiona las personas que rastrea Home Assistant.", + "description": "Gestiona las personas a las que rastrea Home Assistant.", "detail": { "create": "Crear", "delete": "Eliminar", @@ -1636,8 +1638,8 @@ "delete_scene": "Eliminar escena", "edit_scene": "Editar escena", "header": "Editor de escenas", - "introduction": "El editor de escenas te permite crear y editar escenas. Por favor, sigue el siguiente enlace para leer las instrucciones para asegurarte de que has configurado Home Assistant correctamente.", - "learn_more": "Aprende más sobre las escenas", + "introduction": "El editor de escenas te permite crear y editar escenas. En el enlace siguiente puedes leer las instrucciones para asegurarte de que has configurado Home Assistant correctamente.", + "learn_more": "Saber más sobre las escenas", "no_scenes": "No pudimos encontrar ninguna escena editable", "only_editable": "Solo las escenas definidas en scenes.yaml son editables.", "pick_scene": "Elige una escena para editar", @@ -1654,7 +1656,7 @@ "delete_script": "Eliminar script", "header": "Script: {name}", "introduction": "Utiliza scripts para ejecutar una secuencia de acciones.", - "link_available_actions": "Aprende más sobre las acciones disponibles.", + "link_available_actions": "Saber más sobre las acciones disponibles.", "load_error_not_editable": "Solo los scripts dentro de scripts.yaml son editables.", "sequence": "Secuencia", "sequence_sentence": "La secuencia de acciones de este script." @@ -1663,8 +1665,8 @@ "add_script": "Añadir script", "edit_script": "Editar script", "header": "Editor de scripts", - "introduction": "El editor de scripts te permite crear y editar scripts. Por favor, sigue el siguiente enlace para leer las instrucciones para asegurarte de que has configurado Home Assistant correctamente.", - "learn_more": "Aprende más sobre los scripts", + "introduction": "El editor de scripts te permite crear y editar scripts. En el enlace siguiente puedes leer las instrucciones para asegurarte de que has configurado Home Assistant correctamente.", + "learn_more": "Saber más sobre los scripts", "no_scripts": "No hemos encontrado ningún script editable", "trigger_script": "Script de desencadenante" } @@ -1882,7 +1884,7 @@ "wakeup_interval": "Intervalo de activación" }, "description": "Administra tu red Z-Wave", - "learn_more": "Aprende más sobre Z-Wave", + "learn_more": "Saber más sobre Z-Wave", "network_management": { "header": "Administración de red Z-Wave", "introduction": "Ejecutar comandos que afectan a la red Z-Wave. No recibirás comentarios sobre si la mayoría de los comandos tuvieron éxito, pero puedes consultar el Registro OZW para intentar averiguarlo." @@ -1970,7 +1972,7 @@ "set": "Establecer", "source": "Fuente:", "states_ui": "Ir a la interfaz de usuario de estados", - "system_health_error": "El componente Salud del sistema no está cargado. Añade 'system_health:' a configuration.yaml", + "system_health_error": "El componente Estado del Sistema no está cargado. Añade 'system_health:' a configuration.yaml", "title": "Información" }, "logs": { @@ -2481,7 +2483,7 @@ "demo": { "demo_by": "por {name}", "introduction": "¡Bienvenido a casa! Has llegado a la demostración de Home Assistant donde mostramos las mejores interfaces de usuario creadas por nuestra comunidad.", - "learn_more": "Aprende más sobre Home Assistant", + "learn_more": "Saber más sobre Home Assistant", "next_demo": "Siguiente demostración" } }, @@ -2574,7 +2576,7 @@ "language": { "dropdown_label": "Idioma", "header": "Idioma", - "link_promo": "Ayuda traduciendo" + "link_promo": "Ayudar traduciendo" }, "logout": "Cerrar sesión", "logout_text": "¿Estás seguro de que quieres cerrar la sesión?", @@ -2589,7 +2591,7 @@ "empty_state": "Aún no tienes tokens de acceso de larga duración.", "header": "Tokens de acceso de larga duración", "last_used": "Último uso el {date} desde {location}", - "learn_auth_requests": "Aprende cómo realizar solicitudes autenticadas.", + "learn_auth_requests": "Aprender cómo realizar solicitudes autenticadas.", "not_used": "Nunca ha sido usado", "prompt_copy_token": "Copia tu token de acceso. No se mostrará de nuevo.", "prompt_name": "¿Nombre?" @@ -2612,7 +2614,7 @@ "error_load_platform": "Configurar notify.html5.", "error_use_https": "Requiere SSL activado para frontend.", "header": "Notificaciones push", - "link_promo": "Aprender más", + "link_promo": "Saber más", "push_notifications": "Notificaciones push" }, "refresh_tokens": { @@ -2630,7 +2632,7 @@ "dropdown_label": "Tema", "error_no_theme": "No hay temas disponibles", "header": "Tema", - "link_promo": "Aprende sobre los temas" + "link_promo": "Saber más sobre los temas" }, "vibrate": { "description": "Activar o deshabilitar la vibración en este dispositivo al controlar dispositivos.", diff --git a/translations/fr.json b/translations/fr.json index db0b7961e0..da514571b3 100644 --- a/translations/fr.json +++ b/translations/fr.json @@ -537,9 +537,11 @@ "common": { "cancel": "Annuler", "close": "Fermer", + "delete": "Supprimer", "loading": "Chargement", "no": "Non", "save": "Enregistrer", + "successfully_deleted": "Supprimé avec succès", "successfully_saved": "Enregistré avec succès", "yes": "Oui" }, diff --git a/translations/it.json b/translations/it.json index dc41677ff6..dfc30e7502 100644 --- a/translations/it.json +++ b/translations/it.json @@ -537,9 +537,11 @@ "common": { "cancel": "Annulla", "close": "Chiudi", + "delete": "Elimina", "loading": "Caricamento", "no": "No", "save": "Salva", + "successfully_deleted": "Cancellato con successo", "successfully_saved": "Salvataggio riuscito", "yes": "Sì" }, @@ -1310,6 +1312,7 @@ "automations": "Automazioni", "cant_edit": "È possibile modificare solo gli elementi creati nell'Interfaccia Utente.", "caption": "Dispositivi", + "confirm_delete": "Sei sicuro di voler eliminare questo dispositivo?", "confirm_rename_entity_ids": "Vuoi anche rinominare gli ID entità delle tue entità?", "data_table": { "area": "Area", @@ -1320,6 +1323,7 @@ "model": "Modello", "no_devices": "Nessun dispositivo" }, + "delete": "Elimina", "description": "Gestisci i dispositivi collegati", "details": "Ecco tutti i dettagli del tuo dispositivo.", "device_not_found": "Dispositivo non trovato.", @@ -2157,6 +2161,7 @@ "maximum": "Massimo", "minimum": "Minimo", "name": "Nome", + "no_theme": "Nessun tema", "refresh_interval": "Intervallo di aggiornamento", "show_icon": "Mostrare l'icona?", "show_name": "Mostrare il nome?", @@ -2330,7 +2335,8 @@ "view": { "panel_mode": { "description": "In questo modo viene eseguito il rendering della prima scheda a larghezza intera; altre schede in questa vista non verranno renderizzate.", - "title": "Modalità pannello?" + "title": "Modalità pannello?", + "warning_multiple_cards": "Questa vista contiene più di una scheda, ma una vista a pannello può mostrare solo una scheda." } } }, diff --git a/translations/lb.json b/translations/lb.json index dd4b3f3d76..50244cd3ad 100644 --- a/translations/lb.json +++ b/translations/lb.json @@ -537,9 +537,11 @@ "common": { "cancel": "Ofbriechen", "close": "Zoumaachen", + "delete": "Läschen", "loading": "Lued", "no": "Nee", "save": "Späicheren", + "successfully_deleted": "Erfollegräich geläscht.", "successfully_saved": "Erfollegräich gespäichert.", "yes": "Jo" }, @@ -2112,6 +2114,7 @@ "required": "Obligatoresch" }, "entities": { + "description": "D'Entitéite Kaart ass déi am meeschten allgemengen Zort Kaart. Si gruppéiert Entitéite gemeinsam a Lëschten.", "name": "Entitéiten", "show_header_toggle": "Titel Schalter uweisen?", "toggle": "Entitéiten ëmschalten" @@ -2120,9 +2123,11 @@ "name": "Entitéite Knäppchen" }, "entity-filter": { + "description": "D'Entity Filter Kaart erlaabt Iech eng Lëscht vun Entitéiten ze definéieren déi nëmmen ugewise gi wann se an engem bestëmmten Zoustand sinn.", "name": "Entitéite Filter" }, "gauge": { + "description": "D'Gauge Kaart ass eng Basis Kaart déi Sensor Date visuell duerstellt.", "name": "Skala", "severity": { "define": "Schwieregkeetsgrad definéieren?", @@ -2161,6 +2166,7 @@ }, "glance": { "columns": "Kolonnen", + "description": "D'Glance Kaart ass nëtzlech fir verschidde Sensoren an enger kompakter Iwwersiicht ze gruppéieren.", "name": "Usiicht" }, "history-graph": { diff --git a/translations/ru.json b/translations/ru.json index 27e2dcb308..70ec3a854c 100644 --- a/translations/ru.json +++ b/translations/ru.json @@ -537,9 +537,11 @@ "common": { "cancel": "Отменить", "close": "Закрыть", + "delete": "Удалить", "loading": "Загрузка", "no": "Нет", "save": "Сохранить", + "successfully_deleted": "Успешно удалено", "successfully_saved": "Успешно сохранено", "yes": "Да" }, diff --git a/translations/sk.json b/translations/sk.json index b087c8731a..59ff4bf3f2 100644 --- a/translations/sk.json +++ b/translations/sk.json @@ -535,9 +535,11 @@ }, "common": { "cancel": "Zrušiť", + "delete": "Odstrániť", "loading": "Načítava sa", "no": "Nie", "save": "Uložiť", + "successfully_deleted": "Úspešne odstránené", "successfully_saved": "Úspešne uložené", "yes": "Áno" }, @@ -1347,6 +1349,7 @@ "open_site": "Otvoriť webovú stránku" }, "failed_create_area": "Nepodarilo sa vytvoriť oblasť.", + "finish": "Dokončiť", "loading_first_time": "Počkajte, kým sa inštaluje integrácia", "name_new_area": "Názov novej oblasti?" }, diff --git a/translations/zh-Hant.json b/translations/zh-Hant.json index d51fcc42e4..4f1dc5c654 100644 --- a/translations/zh-Hant.json +++ b/translations/zh-Hant.json @@ -537,9 +537,11 @@ "common": { "cancel": "取消", "close": "關閉", + "delete": "刪除", "loading": "讀取中", "no": "否", "save": "儲存", + "successfully_deleted": "成功刪除", "successfully_saved": "成功儲存", "yes": "是" }, From 375abfb95e9b9ae8a5f0deae228a0707d99ec324 Mon Sep 17 00:00:00 2001 From: HomeAssistant Azure Date: Sun, 29 Mar 2020 00:32:56 +0000 Subject: [PATCH 51/66] [ci skip] Translation update --- translations/da.json | 2 + translations/ko.json | 2 + translations/nb.json | 152 ++++++++++++++++++++++--------------------- translations/pl.json | 2 + 4 files changed, 83 insertions(+), 75 deletions(-) diff --git a/translations/da.json b/translations/da.json index b5483529da..63cf47bba6 100644 --- a/translations/da.json +++ b/translations/da.json @@ -537,9 +537,11 @@ "common": { "cancel": "Annuller", "close": "Luk", + "delete": "Slet", "loading": "Indlæser", "no": "Nej", "save": "Gem", + "successfully_deleted": "Slettet", "successfully_saved": "Gemt", "yes": "Ja" }, diff --git a/translations/ko.json b/translations/ko.json index e0a5f89404..9c3ffb7371 100644 --- a/translations/ko.json +++ b/translations/ko.json @@ -537,9 +537,11 @@ "common": { "cancel": "취소", "close": "닫기", + "delete": "삭제", "loading": "읽는 중", "no": "아니오", "save": "저장", + "successfully_deleted": "성공적으로 삭제되었습니다", "successfully_saved": "성공적으로 저장되었습니다", "yes": "예" }, diff --git a/translations/nb.json b/translations/nb.json index a1fb200206..cd549e078a 100644 --- a/translations/nb.json +++ b/translations/nb.json @@ -26,9 +26,9 @@ "device_tracker": "Enhetssporing", "fan": "Vifte", "group": "Gruppe", - "hassio": "Hass.io", - "history_graph": "Historisk graf", - "homeassistant": "Home Assistant", + "hassio": "", + "history_graph": "Historie graf", + "homeassistant": "", "image_processing": "Bildebehandling", "input_boolean": "Angi boolsk", "input_datetime": "Angi datotid", @@ -37,24 +37,24 @@ "input_text": "Angi tekst", "light": "Lys", "lock": "Lås", - "lovelace": "Lovelace", + "lovelace": "", "mailbox": "Postkasse", "media_player": "Mediaspiller", "notify": "Varsle", - "person": "Person", + "person": "", "plant": "Plante", "proximity": "Nærhet", "remote": "Fjernkontroll", "scene": "Scene", "script": "Skript", - "sensor": "Sensor", + "sensor": "", "sun": "Sol", "switch": "Bryter", "system_health": "Systemhelse", - "updater": "Oppdateringer", + "updater": "Oppdater", "vacuum": "Støvsuger", - "weblink": "Lenke", - "zha": "ZHA", + "weblink": "Nettlink", + "zha": "", "zwave": "Z-Wave" }, "groups": { @@ -153,7 +153,7 @@ "on": "Lavt" }, "cold": { - "off": "Normal", + "off": "", "on": "Kald" }, "connectivity": { @@ -205,8 +205,8 @@ "on": "Hjemme" }, "problem": { - "off": "OK", - "on": "Problem" + "off": "", + "on": "" }, "safety": { "off": "Sikker", @@ -288,7 +288,7 @@ "locked": "Låst", "not_home": "Borte", "off": "Av", - "ok": "OK", + "ok": "", "on": "På", "open": "Åpen", "opening": "Åpner", @@ -321,7 +321,7 @@ "not_home": "Borte" }, "plant": { - "ok": "OK", + "ok": "", "problem": "Problem" }, "remote": { @@ -485,8 +485,8 @@ "actions": { "cancel": "Avbryt", "finish": "Ferdig", - "pause": "pause", - "start": "start" + "pause": "", + "start": "" } }, "vacuum": { @@ -537,9 +537,11 @@ "common": { "cancel": "Avbryt", "close": "Lukk", + "delete": "Slett", "loading": "Laster", "no": "Nei", "save": "Lagre", + "successfully_deleted": "Slettet", "successfully_saved": "Vellykket lagring", "yes": "Ja" }, @@ -593,7 +595,7 @@ "second": "{count} {count, plural,\n one {sekund}\n other {sekunder}\n}", "week": "{count} {count, plural,\n one {uke}\n other {uker}\n}" }, - "future": "Om {time}", + "future": "om {time}", "never": "Aldri", "past": "{time} siden" }, @@ -610,7 +612,7 @@ }, "confirmation": { "cancel": "Avbryt", - "ok": "OK", + "ok": "", "title": "Er du sikker?" }, "domain_toggler": { @@ -627,13 +629,13 @@ "enabled_label": "Aktiver entitet", "entity_id": "Entitets-ID", "icon": "Overstyring av ikon", - "icon_error": "Ikoner bør være i formatet 'prefix:iconname', f.eks .", + "icon_error": "Ikoner bør være i formatet 'prefiks:ikonnavn', f.eks 'mdi:home'", "name": "Overstyr Navn", - "note": "Merk: dette fungerer kanskje ikke ennå med alle integrasjoner.", + "note": "Merk: dette fungerer kanskje ikke enda med alle integrasjoner.", "unavailable": "Denne entiteten er ikke tilgjengelig for øyeblikket.", "update": "Oppdater" }, - "no_unique_id": "Denne enheten har ikke en unik ID, derfor kan innstillingene ikke administreres fra brukergrensesnittet.", + "no_unique_id": "Denne entiteten har ikke en unik ID, derfor kan innstillingene ikke administreres fra brukergrensesnittet.", "related": "Relaterte", "settings": "Innstillinger" }, @@ -641,7 +643,7 @@ "cancel": "Avbryt", "close": "Lukk", "default_confirmation_title": "Er du sikker?", - "ok": "OK" + "ok": "" }, "helper_settings": { "generic": { @@ -682,10 +684,10 @@ "text": "Tekst" }, "not_editable": "Kan ikke redigeres", - "not_editable_text": "Denne enheten kan ikke endres fra brukergrensesnittet fordi den er definert i configuration.yaml.", + "not_editable_text": "Denne entiteten kan ikke endres fra brukergrensesnittet fordi den er definert i configuration.yaml.", "platform_not_loaded": "{platform}-integreringen er ikke lastet inn. Legg til konfigurasjonen ved å legge til 'default_config:' eller '{platform}:'.", "required_error_msg": "Dette feltet er påkrevd", - "yaml_not_editable": "Innstillingene for denne enheten kan ikke redigeres fra brukergrensesnittet. Bare enheter som er konfigurert fra brukergrensesnittet, kan konfigureres fra brukergrensesnittet." + "yaml_not_editable": "Innstillingene for denne entiteten kan ikke redigeres fra brukergrensesnittet. Bare entiteter som er konfigurert fra brukergrensesnittet, kan konfigureres fra brukergrensesnittet." }, "more_info_control": { "dismiss": "Avvis dialogboksen", @@ -718,11 +720,11 @@ "commands": "Støvsugerkommandoer:", "fan_speed": "Viftehastighet", "locate": "Lokaliser", - "pause": "Pause", - "return_home": "Vende hjem", - "start": "Start", + "pause": "", + "return_home": "Returner hjem", + "start": "", "start_pause": "Start / Pause", - "status": "Status", + "status": "", "stop": "Stopp" } }, @@ -761,7 +763,7 @@ "manuf": "av {manufacturer}", "no_area": "Intet område", "power_source": "Strømkilde", - "quirk": "Quirk", + "quirk": "", "services": { "reconfigure": "Rekonfigurer ZHA-enhet (heal enhet). Bruk dette hvis du har problemer med enheten. Hvis den aktuelle enheten er en batteridrevet enhet, sørg for at den er våken og aksepterer kommandoer når du bruker denne tjenesten.", "remove": "Fjern en enhet fra Zigbee-nettverket.", @@ -917,9 +919,9 @@ }, "sun": { "after": "Etter:", - "after_offset": "Utsette (valgfritt)", + "after_offset": "Etter forskyvning (valgfritt)", "before": "Før:", - "before_offset": "Fremskynde (valgfritt)", + "before_offset": "Før forskyvning (valgfritt)", "label": "Sol", "sunrise": "Soloppgang", "sunset": "Solnedgang" @@ -987,12 +989,12 @@ }, "homeassistant": { "event": "Hendelse:", - "label": "Home Assistant", + "label": "", "shutdown": "Slå av", - "start": "Start" + "start": "" }, "mqtt": { - "label": "MQTT", + "label": "", "payload": "Nyttelast (valgfritt)", "topic": "Emne" }, @@ -1074,7 +1076,7 @@ "state_reporting_error": "Kan ikke {enable_disable} rapportere status.", "sync_entities": "Synkronisér entiteter", "sync_entities_error": "Kunne ikke synkronisere entiteter:", - "title": "Alexa" + "title": "" }, "connected": "Tilkoblet", "connection_status": "Status for skytilkobling", @@ -1093,7 +1095,7 @@ "security_devices": "Sikkerhetsenheter", "sync_entities": "Synkronisér entiteter til Google", "sync_entities_404_message": "Kunne ikke synkronisere enhetene dine med Google, be Google 'Hei Google, synkroniser enhetene mine' for å synkronisere enhetene dine.", - "title": "Google Assistant" + "title": "" }, "integrations": "Integrasjoner", "integrations_introduction": "Integrasjoner for Home Assistant Cloud lar deg koble til tjenester i skyen uten å måtte avsløre Home Assistant-forekomsten offentlig på internett.", @@ -1131,9 +1133,9 @@ "expose": "Eksponer til Alexa", "exposed_entities": "Eksponerte entiteter", "not_exposed_entities": "Ikke-eksponerte entiteter", - "title": "Alexa" + "title": "" }, - "caption": "Home Assistant Cloud", + "caption": "", "description_features": "Kontroller borte fra hjemmet, integrere med Alexa og Google Assistant.", "description_login": "Logget inn som {email}", "description_not_login": "Ikke pålogget", @@ -1171,7 +1173,7 @@ "exposed_entities": "Eksponerte entiteter", "not_exposed_entities": "Ikke-eksponerte entiteter", "sync_to_google": "Synkroniserer endringer til Google.", - "title": "Google Assistant" + "title": "" }, "login": { "alert_email_confirm_necessary": "Du må bekrefte e-posten din før du logger inn.", @@ -1377,7 +1379,7 @@ "confirm_title": "Vil du aktivere {number} enheter?" }, "filter": { - "filter": "Filter", + "filter": "", "show_disabled": "Vis deaktiverte entiteter", "show_readonly": "Vis skrivebeskyttede enheter", "show_unavailable": "Vis utilgjengelige enheter" @@ -1388,7 +1390,7 @@ "entity_id": "Entitets-ID", "integration": "Integrering", "name": "Navn", - "status": "Status" + "status": "" }, "integrations_page": "Integrasjonsside", "introduction": "Home Assistant bygger opp et register over hver entitet den har sett som kan identifiseres unikt. Hver av disse entitetene vil ha en ID som er reservert kun til denne.", @@ -1404,7 +1406,7 @@ "show_disabled": "Vis deaktiverte entiteter", "status": { "disabled": "Deaktivert", - "ok": "Ok", + "ok": "", "readonly": "Skrivebeskyttet", "restored": "Gjennopprettet", "unavailable": "Utilgjengelig" @@ -1427,7 +1429,7 @@ "editable": "Redigerbare", "entity_id": "Entitets-ID", "name": "Navn", - "type": "Type" + "type": "" } }, "types": { @@ -1501,24 +1503,24 @@ }, "introduction": "Her er det mulig å konfigurere dine komponenter og Home Assistant. Ikke alt er mulig å konfigurere fra brukergrensesnittet enda, men vi jobber med det.", "lovelace": { - "caption": "Lovelace Dashboards", + "caption": "Lovelace dashbord", "dashboards": { "cant_edit_default": "Standard Lovelace-dashbordet kan ikke redigeres fra brukergrensesnittet. Du kan skjule det ved å angi et annet instrumentbord som standard.", - "cant_edit_yaml": "Instrumentbord som er definert i YAML, kan ikke redigeres fra brukergrensesnittet. Endre dem i configuration.yaml.", - "caption": "Oversikter", + "cant_edit_yaml": "Dashbord som er definert i YAML, kan ikke redigeres fra brukergrensesnittet. Endringer gjøres i configuration.yaml.", + "caption": "Dashbord", "conf_mode": { "storage": "UI kontrollert", "yaml": "YAML-fil" }, - "confirm_delete": "Er du sikker på at du vil slette dette instrumentbordet?", + "confirm_delete": "Er du sikker på at du vil slette dette dashbordet?", "default_dashboard": "Dette er standard instrumentbord", "detail": { "create": "Opprett", "delete": "Slett", "dismiss": "Lukk", - "edit_dashboard": "Redigere instrumentbord", + "edit_dashboard": "Redigere dashbord", "icon": "Ikon", - "new_dashboard": "Legg til nytt instrumentbord", + "new_dashboard": "Legg til nytt dashbord", "remove_default": "Fjern som standard på denne enheten", "require_admin": "Bare administrator", "set_default": "Angi som standard på denne enheten", @@ -1526,11 +1528,11 @@ "title": "Tittel", "title_required": "Tittel er nødvendig.", "update": "Oppdater", - "url": "Url", + "url": "", "url_error_msg": "URLen skal inneholde en - og kan ikke inneholde mellomrom eller spesialtegn, bortsett fra _ og -" }, "picker": { - "add_dashboard": "Legge til instrumentbord", + "add_dashboard": "Legg til dashbord", "headers": { "conf_mode": "Konfigurasjonsmetode", "default": "Standard", @@ -1542,7 +1544,7 @@ "open": "Åpne" } }, - "description": "Konfigurer Lovelace Dashboards", + "description": "Konfigurer dine Lovelace dashbord", "resources": { "cant_edit_yaml": "Du bruker Lovelace i YAML-modus, derfor kan du ikke administrere ressursene dine via brukergrensesnittet. Behandle dem i configuration.yaml.", "caption": "Ressurser", @@ -1554,7 +1556,7 @@ "new_resource": "Legg til ny ressurs", "type": "Ressurstype", "update": "Oppdater", - "url": "Url", + "url": "", "url_error_msg": "Url-adresse er et obligatorisk felt", "warning_header": "Vær forsiktig!", "warning_text": "Det kan være farlig å legge til ressurser, sørg for at du kjenner kilden til ressursen og stoler på dem. Dårlige ressurser kan skade systemet ditt alvorlig." @@ -1562,8 +1564,8 @@ "picker": { "add_resource": "Legg til ressurs", "headers": { - "type": "Type", - "url": "Url" + "type": "", + "url": "" }, "no_resources": "Ingen ressurser" }, @@ -1722,7 +1724,7 @@ "enter_new_name": "Skriv inn nytt navn", "group": "Gruppe", "group_update_failed": "Gruppeoppdatering mislyktes:", - "id": "ID", + "id": "Id", "owner": "Eier", "rename_user": "Gi nytt navn til bruker", "system_generated": "System generert", @@ -1746,7 +1748,7 @@ "caption": "Legg til enheter", "description": "Legg til enheter i Zigbee-nettverket" }, - "caption": "ZHA", + "caption": "", "cluster_attributes": { "attributes_of_cluster": "Attributter for den valgte klyngen", "get_zigbee_attribute": "Hent ZigBee-attributt", @@ -1860,8 +1862,8 @@ "name": "Navn", "new_zone": "Ny sone", "passive": "Passiv", - "passive_note": "Passive soner er skjult i frontend og brukes ikke som sted for enhetssporere. Dette er nyttig hvis du bare vil bruke det til automatiseringer.", - "radius": "Radius", + "passive_note": "Passive soner er skjult i grensesnittet og brukes ikke som sted for enhetssporere. Dette er nyttig hvis du bare vil bruke det til automatiseringer.", + "radius": "", "required_error_msg": "Dette feltet er påkrevd", "update": "Oppdater" }, @@ -1971,7 +1973,7 @@ "source": "Kilde:", "states_ui": "Gå til states UI", "system_health_error": "System Health-komponenten er ikke lastet. Legg til 'system_health:' til configurasjon.yaml", - "title": "Info" + "title": "Informasjon" }, "logs": { "clear": "Tøm", @@ -2002,7 +2004,7 @@ "call_service": "Kall tjeneste", "column_description": "Beskrivelse", "column_example": "Eksempel", - "column_parameter": "Parameter", + "column_parameter": "", "data": "Tjenestedata (YAML, valgfritt)", "description": "Med verktøyet for tjenesteutvikling kan du utføre alle tilgjengelige tjenester i Home Assistant.", "fill_example_data": "Fyll ut eksempeldata", @@ -2088,7 +2090,7 @@ } }, "changed_toast": { - "message": "Lovelace UI-konfigurasjonen ble oppdatert. refresh for å se endringer?", + "message": "Lovelace UI-konfigurasjonen ble oppdatert for dette dashbordet. oppdater for å se endringer?", "refresh": "Oppdater" }, "editor": { @@ -2111,7 +2113,7 @@ "condition_explanation": "Kortet vil vises når ALLE betingelser nedenfor er oppfylt.", "conditions": "Forhold", "current_state": "Gjeldende", - "description": "Betingelseskortet viser et annet kort basert på enhetstilstander.", + "description": "Betingelseskortet viser et annet kort basert på entitetstilstander.", "name": "Betinget", "state_equal": "Tilstanden er lik", "state_not_equal": "Tilstanden er ikke lik" @@ -2121,7 +2123,7 @@ "required": "Nødvendig" }, "entities": { - "description": " Entities card er den vanligste typen kort. Den grupperer elementer i lister.", + "description": "Entities card er den vanligste typen kort. Den grupperer elementer i lister.", "name": "Entiteter", "show_header_toggle": "Vis kortbryter?", "toggle": "Aktivér/deaktivér entiteter." @@ -2130,7 +2132,7 @@ "name": "Entitetsknapp" }, "entity-filter": { - "description": "Entity Filter-kortet lar deg definere en liste over enheter du bare vil spore når du er i en viss tilstand.", + "description": "Entity Filter-kortet lar deg definere en liste over entiteter du bare vil spore når de er i en viss tilstand.", "name": "Entitetsfilter" }, "gauge": { @@ -2157,7 +2159,7 @@ "manual": "Manuell", "manual_description": "Trenger du å legge til et tilpasset kort eller bare ønsker å skrive yaml manuelt?", "maximum": "Maksimalt", - "minimum": "Minimum", + "minimum": "", "name": "Navn", "no_theme": "Ingen tema", "refresh_interval": "Oppdateringsintervall", @@ -2169,7 +2171,7 @@ "theme": "Tema", "title": "Tittel", "unit": "Betegnelse", - "url": "Url" + "url": "" }, "glance": { "columns": "Kolonner", @@ -2214,11 +2216,11 @@ "name": "Bildeelementer" }, "picture-entity": { - "description": "Picture Entity-kortet viser en enhet i form av et bilde. I stedet for bilder fra URL, kan det også vise bilde av kameraenheter.", + "description": "Picture Entity-kortet viser en entitet i form av et bilde. I stedet for bilder fra URL, kan det også vise bilde av kameraenheter.", "name": "Bildeoppføring" }, "picture-glance": { - "description": "Picture Glance-kortet viser et bilde og tilhørende entitetstilstander som et ikon. Enhetene på høyre side tillater veksling av handlinger, andre viser dialogboksen mer informasjon.", + "description": "Picture Glance-kortet viser et bilde og tilhørende entitetstilstander som et ikon. Entitetene på høyre side tillater veksling av handlinger, andre viser dialogboksen mer informasjon.", "name": "Bilde blikk" }, "picture": { @@ -2233,7 +2235,7 @@ "description": "Sensorkortet gir deg en rask oversikt over sensortilstanden din med en valgfri graf for å visualisere endring over tid.", "graph_detail": "Detaljer for graf", "graph_type": "Graf type", - "name": "Sensor" + "name": "" }, "shopping-list": { "description": "På Shopping List-kortet kan du legge til, redigere, sjekke av og fjerne gjenstander fra handlelisten din.", @@ -2241,7 +2243,7 @@ "name": "Handleliste" }, "thermostat": { - "description": "Termostatkortet gir kontroll over din klimaenhet. Lar deg endre temperaturen og modus for enheten.", + "description": "Termostatkortet gir kontroll over din klimaentitet. Lar deg endre temperaturen og modus for entiteten.", "name": "Termostat" }, "vertical-stack": { @@ -2256,7 +2258,7 @@ "edit_card": { "add": "Legg til kort", "delete": "Slett kort", - "duplicate": "Duplikatkort", + "duplicate": "Kopiér kort", "edit": "Rediger", "header": "Kortkonfigurasjon", "move": "Flytt til visning", @@ -2323,7 +2325,7 @@ "save": "Ta kontroll", "yaml_config": "For å hjelpe deg med å starte, her er den gjeldende konfigurasjonen av dette dashbordet:", "yaml_control": "Hvis du vil ta kontroll i YAML-modus, oppretter du en YAML-fil med navnet du angav i konfigurasjonen for dette instrumentbordet, eller standard 'ui-lovelace.yaml'.", - "yaml_mode": "Du bruker YAML-modus, det betyr at du ikke kan endre Lovelace config fra brukergrensesnittet. Hvis du vil endre Lovelace fra brukergrensesnittet, fjerner du «modus: yaml» fra Lovelace-konfigurasjonen i 'configuration.yaml'." + "yaml_mode": "Du bruker YAML-modus, det betyr at du ikke kan endre Lovelace config fra brukergrensesnittet. Hvis du vil endre Lovelace fra brukergrensesnittet, fjerner du 'modus: yaml' fra Lovelace-konfigurasjonen i 'configuration.yaml'." }, "suggest_card": { "add": "Legg til i Lovelace UI", @@ -2344,7 +2346,7 @@ "exit_edit_mode": "Avslutt redigeringsmodus for brukergrensesnitt", "help": "Hjelp", "refresh": "Oppdater", - "reload_resources": "Last inn ressursene på nytt", + "reload_resources": "Last inn ressurser på nytt", "unused_entities": "Ubrukte entiteter" }, "reload_lovelace": "Last inn UI", @@ -2369,7 +2371,7 @@ "existing_cards": "Du kan ikke slette en visning som har kort i den. Fjern kortene først." }, "warning": { - "attribute_not_found": "Attributtet {attributt} er ikke tilgjengelig i: {entity}", + "attribute_not_found": "Attributtet {attribute} er ikke tilgjengelig i: {entity}", "entity_non_numeric": "Entiteten er ikke-numerisk: {entity}", "entity_not_found": "Entitet ikke tilgjengelig: {entity}" } diff --git a/translations/pl.json b/translations/pl.json index 7ec9ff85b9..6eaa5b61cd 100644 --- a/translations/pl.json +++ b/translations/pl.json @@ -537,9 +537,11 @@ "common": { "cancel": "Anuluj", "close": "Zamknij", + "delete": "Usuń", "loading": "Ładowanie", "no": "Nie", "save": "Zapisz", + "successfully_deleted": "Pomyślnie usunięto", "successfully_saved": "Pomyślnie zapisano", "yes": "Tak" }, From 54b57e62229fe42906d5becc79e1ee40ed805be0 Mon Sep 17 00:00:00 2001 From: Ian Richardson Date: Sun, 29 Mar 2020 06:30:52 -0500 Subject: [PATCH 52/66] =?UTF-8?q?=E2=9C=A8=20add=20volume=20slider=20to=20?= =?UTF-8?q?media=5Fplayer=20row=20(#4743)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ✨ add volume slider to media_player row * add more controls * flex slider * override width * volume buttons when narrow * address comments * Updates for rebase * attempt to use debounce. not working * remove log * fix observer * address some review comments * unobserve * address comments --- .../hui-media-player-entity-row.ts | 222 +++++++++++++++--- 1 file changed, 191 insertions(+), 31 deletions(-) diff --git a/src/panels/lovelace/entity-rows/hui-media-player-entity-row.ts b/src/panels/lovelace/entity-rows/hui-media-player-entity-row.ts index 721648a11d..755b8b706a 100644 --- a/src/panels/lovelace/entity-rows/hui-media-player-entity-row.ts +++ b/src/panels/lovelace/entity-rows/hui-media-player-entity-row.ts @@ -21,14 +21,32 @@ import { SUPPORTS_PLAY, SUPPORT_NEXT_TRACK, SUPPORT_PAUSE, + SUPPORT_TURN_ON, + SUPPORT_TURN_OFF, + SUPPORT_PREVIOUS_TRACK, + SUPPORT_VOLUME_SET, + SUPPORT_VOLUME_MUTE, + SUPPORT_VOLUME_BUTTONS, } from "../../../data/media-player"; import { hasConfigOrEntityChanged } from "../common/has-changed"; +import { computeRTLDirection } from "../../../common/util/compute_rtl"; +import { debounce } from "../../../common/util/debounce"; @customElement("hui-media-player-entity-row") class HuiMediaPlayerEntityRow extends LitElement implements LovelaceRow { @property() public hass?: HomeAssistant; - @property() private _config?: EntityConfig; + @property() private _narrow?: boolean = false; + @property() private _veryNarrow?: boolean = false; + private _resizeObserver?: ResizeObserver; + private _debouncedResizeListener = debounce( + () => { + this._narrow = (this.parentElement?.clientWidth || 0) < 350; + this._veryNarrow = (this.parentElement?.clientWidth || 0) < 300; + }, + 250, + false + ); public setConfig(config: EntityConfig): void { if (!config || !config.entity) { @@ -38,6 +56,21 @@ class HuiMediaPlayerEntityRow extends LitElement implements LovelaceRow { this._config = config; } + public connectedCallback(): void { + super.connectedCallback(); + if (!this._resizeObserver) { + this._attachObserver(); + } + } + + public disconnectedCallback(): void { + this._resizeObserver?.unobserve(this); + } + + protected firstUpdated(): void { + this._attachObserver(); + } + protected shouldUpdate(changedProps: PropertyValues): boolean { return hasConfigOrEntityChanged(this, changedProps); } @@ -68,46 +101,128 @@ class HuiMediaPlayerEntityRow extends LitElement implements LovelaceRow { .secondaryText=${this._computeMediaTitle(stateObj)} > ${stateObj.state === "off" || stateObj.state === "idle" + ? supportsFeature(stateObj, SUPPORT_TURN_ON) + : supportsFeature(stateObj, SUPPORT_TURN_OFF) ? html` -
- ${this.hass!.localize(`state.media_player.${stateObj.state}`) || - this.hass!.localize(`state.default.${stateObj.state}`) || - stateObj.state} -
+ ` - : html` -
- ${stateObj.state !== "playing" && - !supportsFeature(stateObj, SUPPORTS_PLAY) - ? "" - : html` - - `} - ${supportsFeature(stateObj, SUPPORT_NEXT_TRACK) - ? html` - - ` - : ""} -
- `} + : ""} +
+
+ ${supportsFeature(stateObj, SUPPORT_VOLUME_MUTE) + ? html` + + ` + : ""} + ${!this._narrow && supportsFeature(stateObj, SUPPORT_VOLUME_SET) + ? html` + + ` + : !this._veryNarrow && + supportsFeature(stateObj, SUPPORT_VOLUME_BUTTONS) + ? html` + + + ` + : ""} +
+
+ ${!this._veryNarrow && + supportsFeature(stateObj, SUPPORT_PREVIOUS_TRACK) + ? html` + + ` + : ""} + ${stateObj.state !== "playing" && + !supportsFeature(stateObj, SUPPORTS_PLAY) + ? "" + : html` + + `} + ${supportsFeature(stateObj, SUPPORT_NEXT_TRACK) + ? html` + + ` + : ""} +
+
`; } static get styles(): CSSResult { return css` + :host { + display: block; + } + .flex { + display: flex; + align-items: center; + padding-left: 48px; + justify-content: space-between; + } + .volume { + display: flex; + flex-grow: 2; + flex-shrink: 2; + } .controls { white-space: nowrap; } + ha-slider { + flex-grow: 2; + flex-shrink: 2; + width: 100%; + } `; } + private _attachObserver(): void { + if (typeof ResizeObserver !== "function") { + import("resize-observer").then((modules) => { + modules.install(); + this._attachObserver(); + }); + return; + } + + this._resizeObserver = new ResizeObserver(() => + this._debouncedResizeListener() + ); + + this._resizeObserver.observe(this); + } + private _computeControlIcon(stateObj: HassEntity): string { if (stateObj.state !== "playing") { return "hass:play"; @@ -143,19 +258,64 @@ class HuiMediaPlayerEntityRow extends LitElement implements LovelaceRow { return prefix && suffix ? `${prefix}: ${suffix}` : prefix || suffix || ""; } - private _playPause(ev: MouseEvent): void { - ev.stopPropagation(); + private _togglePower(): void { + const stateObj = this.hass!.states[this._config!.entity]; + + this.hass!.callService( + "media_player", + stateObj.state === "off" || stateObj.state === "idle" + ? "turn_on" + : "turn_off", + { + entity_id: this._config!.entity, + } + ); + } + + private _playPause(): void { this.hass!.callService("media_player", "media_play_pause", { entity_id: this._config!.entity, }); } - private _nextTrack(ev: MouseEvent): void { - ev.stopPropagation(); + private _previousTrack(): void { + this.hass!.callService("media_player", "media_previous_track", { + entity_id: this._config!.entity, + }); + } + + private _nextTrack(): void { this.hass!.callService("media_player", "media_next_track", { entity_id: this._config!.entity, }); } + + private _toggleMute() { + this.hass!.callService("media_player", "volume_mute", { + entity_id: this._config!.entity, + is_volume_muted: !this.hass!.states[this._config!.entity].attributes + .is_volume_muted, + }); + } + + private _volumeDown() { + this.hass!.callService("media_player", "volume_down", { + entity_id: this._config!.entity, + }); + } + + private _volumeUp() { + this.hass!.callService("media_player", "volume_up", { + entity_id: this._config!.entity, + }); + } + + private _selectedValueChanged(ev): void { + this.hass!.callService("media_player", "volume_set", { + entity_id: this._config!.entity, + volume_level: ev.target.value / 100, + }); + } } declare global { From ff873e2f71ea29ca41c47672a1ea366c3365c613 Mon Sep 17 00:00:00 2001 From: Ian Richardson Date: Sun, 29 Mar 2020 06:49:27 -0500 Subject: [PATCH 53/66] add name option to buttons row (#5083) * add name option to buttons row * explicit show_name * Update src/panels/lovelace/components/hui-buttons-base.ts Co-Authored-By: Bram Kragten * Update src/panels/lovelace/components/hui-buttons-base.ts Co-Authored-By: Bram Kragten * lint Co-authored-by: Bram Kragten --- src/panels/lovelace/cards/types.ts | 2 + .../lovelace/components/hui-buttons-base.ts | 53 ++++++++++++------- 2 files changed, 37 insertions(+), 18 deletions(-) diff --git a/src/panels/lovelace/cards/types.ts b/src/panels/lovelace/cards/types.ts index 009616ddee..e00b58b83f 100644 --- a/src/panels/lovelace/cards/types.ts +++ b/src/panels/lovelace/cards/types.ts @@ -33,6 +33,8 @@ export interface EntitiesCardEntityConfig extends EntityConfig { hold_action?: ActionConfig; double_tap_action?: ActionConfig; state_color?: boolean; + show_name?: boolean; + show_icon?: boolean; } export interface EntitiesCardConfig extends LovelaceCardConfig { diff --git a/src/panels/lovelace/components/hui-buttons-base.ts b/src/panels/lovelace/components/hui-buttons-base.ts index c0890e51b4..3533028682 100644 --- a/src/panels/lovelace/components/hui-buttons-base.ts +++ b/src/panels/lovelace/components/hui-buttons-base.ts @@ -22,6 +22,7 @@ import { hasAction } from "../common/has-action"; import { ActionHandlerEvent } from "../../../data/lovelace"; import { handleAction } from "../common/handle-action"; import { EntitiesCardEntityConfig } from "../cards/types"; +import { computeStateName } from "../../../common/entity/compute_state_name"; @customElement("hui-buttons-base") export class HuiButtonsBase extends LitElement { @@ -31,9 +32,12 @@ export class HuiButtonsBase extends LitElement { set hass(hass: HomeAssistant) { this._hass = hass; + const entitiesShowingIcons = this.configEntities?.filter( + (entity) => entity.show_icon !== false + ); this._badges.forEach((badge, index: number) => { badge.hass = hass; - badge.stateObj = hass.states[this.configEntities![index].entity]; + badge.stateObj = hass.states[entitiesShowingIcons![index].entity]; }); } @@ -46,22 +50,33 @@ export class HuiButtonsBase extends LitElement { } return html` -
- +
+ ${entityConf.show_icon !== false + ? html` + + ` + : ""} + + ${entityConf.show_name || + (entityConf.name && entityConf.show_name !== false) + ? entityConf.name || computeStateName(stateObj) + : ""} +
`; @@ -88,8 +103,10 @@ export class HuiButtonsBase extends LitElement { .missing { color: #fce588; } - state-badge { + div { cursor: pointer; + align-items: center; + display: inline-flex; } `; } From f7ee7124566df18790f4e1173cbfc1d251f9b8b7 Mon Sep 17 00:00:00 2001 From: HomeAssistant Azure Date: Mon, 30 Mar 2020 00:40:34 +0000 Subject: [PATCH 54/66] [ci skip] Translation update --- translations/cs.json | 5 ++- translations/cy.json | 93 +++++++++++++++++++++++++++++++++++---- translations/fr.json | 30 ++++++------- translations/hu.json | 7 ++- translations/is.json | 35 +++++++++++++-- translations/it.json | 14 +++--- translations/nl.json | 86 ++++++++++++++++++++++++++++++------ translations/sl.json | 8 +++- translations/tr.json | 13 +++++- translations/uk.json | 14 +++++- translations/zh-Hans.json | 2 + 11 files changed, 252 insertions(+), 55 deletions(-) diff --git a/translations/cs.json b/translations/cs.json index 9ea0468af3..195ca00e73 100644 --- a/translations/cs.json +++ b/translations/cs.json @@ -537,9 +537,11 @@ "common": { "cancel": "Zrušit", "close": "Zavřít", + "delete": "Smazat", "loading": "Načítání", "no": "Ne", "save": "Uložit", + "successfully_deleted": "Úspěšně smazáno", "successfully_saved": "Úspěšně uloženo", "yes": "Ano" }, @@ -2333,7 +2335,8 @@ "view": { "panel_mode": { "description": "Toto vykreslí první kartu v plné šířce; ostatní karty v tomto pohledu nebudou vykresleny.", - "title": "Režim panelu?" + "title": "Režim panelu?", + "warning_multiple_cards": "Toto zobrazení obsahuje více než jednu kartu, ale v panelovém zobrazení může zobrazovat pouze 1 kartu." } } }, diff --git a/translations/cy.json b/translations/cy.json index 4f73ecf851..e9ec30d59f 100644 --- a/translations/cy.json +++ b/translations/cy.json @@ -422,8 +422,10 @@ }, "common": { "cancel": "Canslo", + "delete": "Dileu", "loading": "Llwytho", - "save": "Arbed" + "save": "Arbed", + "successfully_deleted": "Dileuwyd yn llwyddiannus" }, "components": { "device-picker": { @@ -439,6 +441,30 @@ } }, "dialogs": { + "entity_registry": { + "editor": { + "delete": "Dileu", + "update": "Diweddariad" + }, + "no_unique_id": "Nid oes gan yr endid hwn ID unigryw, felly ni ellir rheoli ei osodiadau o'r UI." + }, + "helper_settings": { + "input_datetime": { + "date": "Dyddiad", + "datetime": "Dyddiad ac amser", + "mode": "Beth ydych chi eisiau roid fel mewnbwn", + "time": "Amser" + }, + "input_number": { + "step": "Maint y cam" + }, + "input_text": { + "max": "Hyd mwyaf", + "min": "Hyd lleiaf" + }, + "platform_not_loaded": "Nid yw'r integreiddiad {platform} wedi'i lwytho. Ychwanegwch eich cyfluniad ato naill ai trwy ychwanegu 'default_config:' neu '{platform}:'.", + "yaml_not_editable": "Ni ellir olygu gosodiadau'r endid hwn o'r UI. Dim ond endidau a sefydlwyd o'r UI y gellir eu ffurfweddu o'r UI." + }, "more_info_control": { "dismiss": "Gwrthod deialog", "script": { @@ -483,16 +509,20 @@ "areas": { "caption": "Gofrestrfa ardal", "create_area": "CREU ARDAL", + "delete": { + "confirmation_text": "Bydd pob dyfais yn yr ardal hon yn cael ei ddadneilltuo.", + "confirmation_title": "Ydych chi'n siŵr bod chi eisiau dileu'r ardal hon?" + }, "description": "Trosolwg o bob ardal yn eich cartref.", "editor": { - "create": "CREU", + "create": "Creu", "default_name": "Ardal Newydd", - "delete": "DILEU", - "update": "DIWEDDARIAD" + "delete": "Dileu", + "update": "Diweddaru" }, "no_areas": "Edrych fel nad oes gennych ardaloedd eto!", "picker": { - "create_area": "CREU ARDAL", + "create_area": "Creu Ardal", "header": "Gofrestrfa ardal", "integrations_page": "Tudalen rhyngwynebu", "introduction": "Defnyddir ardaloedd i drefnu lle mae dyfeisiau. Defnyddir y wybodaeth hon drwy gydol Home Assistant i helpu chi i drefnu eich rhyngwyneb, caniatadau ac integreiddio â systemau eraill.", @@ -597,7 +627,7 @@ "triggers": { "add": "Ychwanegu sbardun", "delete": "Dileu", - "delete_confirm": "Sicr bod chi eisiau dileu?", + "delete_confirm": "Ydych chi'n siŵr bod chi eisiau dileu hwn?", "duplicate": "Dyblyg", "header": "Sbardunau", "introduction": "Sbarduno yw'r hyn sy'n dechrau proses rheol awtomeiddio. Mae'n bosib dewis nifer o sbardunau i'run rheol. Unwaith mae sbardun yn cychwyn, bydd Home Assistant yn dilysu'r amodau, os o gwbl, a galw'r gweithred. \n\n[dysgwch mwy am sbardunau.] (https://home-assistant.io/docs/automation/trigger/)", @@ -752,6 +782,7 @@ "devices": { "area_picker_label": "Ardal", "automations": "Awtomeiddiadau", + "confirm_delete": "Ydych chi'n siŵr eich bod eisiau dileu y ddyfais hon?", "confirm_rename_entity_ids": "A ydych chi hefyd eisiau ailenwi enwau eich endidau?", "data_table": { "area": "Ardal", @@ -759,8 +790,10 @@ "device": "Dyfais", "integration": "Integreiddio", "manufacturer": "Gwneuthurwr", - "model": "Model" + "model": "Model", + "no_devices": "Dim dyfeisiau" }, + "delete": "Dileu", "details": "Dyma holl fanylion eich dyfais.", "device_not_found": "Heb ganfod y ddyfais.", "info": "Gwybodaeth am ddyfais", @@ -814,6 +847,7 @@ }, "failed_create_area": "Wedi methu creu ardal.", "finish": "Gorffen", + "loading_first_time": "Arhoswch tra bo'r integreiddiad yn cael ei osod", "name_new_area": "Enw'r ardal newydd?", "not_all_required_fields": "Nid yw pob maes gofynnol wedi'i lenwi.", "submit": "Cyflwyno" @@ -823,11 +857,32 @@ "description": "Rheoli dyfeisiau a gwasanaethau cysylltiedig", "details": "Manylion integreiddio", "discovered": "Darganfuwyd", + "ignore": { + "confirm_ignore": "Ydych chi'n siŵr nad ydych am sefydlu'r integreiddiad hwn? Gallwch ddad-wneud hyn drwy glicio ar y 'dangos integreiddiadau a anwybyddwyd' yn y ddewislen gorlif ar y dde uchaf." + }, "integration_not_found": "Heb ganfod integreiddiad", "new": "Sefydlu integreiddiad newydd", "none": "Dim byd wedi'i ffurfweddu eto." }, "introduction": "Yma mae'n bosib ffurfweddu'ch cydrannau ac Home Assistant. Nid yw popeth yn bosib i'w ffurfweddu o'r UI eto, ond rydym yn gweithio arno.", + "lovelace": { + "dashboards": { + "cant_edit_default": "Ni ellir golygu dangosfwrdd safonol Lovelace o'r UI. Gallwch ei guddio trwy osod dangosfwrdd arall yn ddiofyn.", + "cant_edit_yaml": "Ni ellir golygu dangosfyrddau a ddiffinnir yn YAML o'r UI. Newidiwch nhw yn configuration.yaml.", + "default_dashboard": "Dyma'r dangosfwrdd diofyn", + "detail": { + "icon": "Eicon", + "title": "Teitl", + "url_error_msg": "Dylai'r URL gynnwys a - ac ni all gynnwys mannau na chymeriadau arbennig, heblaw am _ ac -" + } + }, + "resources": { + "cant_edit_yaml": "Rydych chi'n defnyddio Lovelace yn y modd YAML, felly ni allwch reoli'ch adnoddau trwy'r UI. Rheolwch nhw yn configuration.yaml.", + "picker": { + "no_resources": "Dim adnoddau" + } + } + }, "person": { "caption": "Pobl", "description": "Rheoli'r pobl mae Home Assistant yn tracio.", @@ -999,6 +1054,9 @@ "showing_entries": "Dangos endidau i" }, "lovelace": { + "add_entities": { + "yaml_unsupported": "Cewch chi ddim defnyddio'r swyddogaeth hon wrth ddefnyddio UI Lovelace yn modd YAML." + }, "cards": { "empty_state": { "go_to_integrations_page": "Ewch i'r dudalen integreiddio.", @@ -1044,6 +1102,9 @@ "gauge": { "name": "Medrydd" }, + "generic": { + "no_theme": "Dim thema" + }, "glance": { "name": "Cipolwg" }, @@ -1090,18 +1151,22 @@ "name": "Rhestr siopa" }, "thermostat": { + "description": "Mae'r cerdyn Thermostat yn rhoi rheolaeth ar eich endid hinsawdd. Yn caniatáu ichi newid tymheredd a modd yr endid.", "name": "Thermostat" }, "vertical-stack": { + "description": "Mae'r cerdyn 'Vertical Stack' yn caniatáu ichi grwpio cardiau lluosog fel bod nhw bob tro yn eistedd yn yr un golofn.", "name": "Stac Fertigol" }, "weather-forecast": { + "description": "Mae'r cerdyn rhagolygon tywydd yn dangos y tywydd. Defnyddiol iawn i'w cynnwys ar ryngwynebau y mae pobl yn eu harddangos ar y wal.", "name": "Rhagolwg tywydd" } }, "edit_card": { "add": "Ychwanegu Cerdyn", "delete": "Dileu", + "duplicate": "Cerdyn dyblyg", "edit": "Golygu", "header": "Ffurfweddu Cerdyn", "move": "Symud", @@ -1120,7 +1185,10 @@ "edit": "Golygu golwg", "header": "Gweld Ffurfweddiad", "move_left": "Symud y wedd i'r chwith", - "move_right": "Symud y wedd i'r dde" + "move_right": "Symud y wedd i'r dde", + "visibility": { + "select_users": "Dewiswch pa ddefnyddwyr ddylai weld yr olygfa hon yn y llywio" + } }, "header": "Golygu rhyngwyneb defnyddiwr", "menu": { @@ -1148,7 +1216,8 @@ "header": "Cymerwch reolaeth ar eich rhyngwyneb defnyddiwr Lovelace", "para": "Gwneith Home Assistant gynnal eich rhyngwyneb defnyddiwr yn ddiofyn, a'i diweddaru pan fydd endidau neu gydrannau Lovelace newydd yn dod ar gael. Os ydych yn cymryd rheolaeth nawn ddim gwneud newidiadau awtomatig pellach i chi.", "para_sure": "A ydych yn siŵr bod chi eisiau rheoli eich rhyngwyneb defnyddiwr?", - "save": "Cymerwch reolaeth" + "save": "Cymerwch reolaeth", + "yaml_mode": "Ydych yn defnyddio YAML modd, sy'n golygu nad ydych yn gallu newid eich Lovelace config o'r UI. Os ydych am newid Lovelace o UI, dileu 'modd: yaml' o eich cyfluniad Lovelace yn 'configuration.yaml.'" }, "view": { "panel_mode": { @@ -1162,9 +1231,14 @@ "exit_edit_mode": "Gadael modd golygu UI", "help": "Help", "refresh": "Adnewyddu", + "reload_resources": "Ail-lwytho adnoddau", "unused_entities": "Endidau heb ei ddefnyddio" }, "reload_lovelace": "Ail-lwytho Lovelace", + "reload_resources": { + "refresh_body": "Rhaid i chi adnewyddu'r dudalen i gwblhau'r ail-lwytho, ydych chi eisiau adnewyddu rŵan?", + "refresh_header": "Ydych chi eisiau adnewyddu?" + }, "unused_entities": { "available_entities": "Rhain yw'r endidau sydd gennych ar gael, ond dim ar eich Lovelace UI eto", "domain": "Parth", @@ -1175,6 +1249,7 @@ "title": "Endidau heb ei ddefnyddio" }, "warning": { + "attribute_not_found": "Priodoledd {attribute} ddim ar gael yn: {entity}", "entity_non_numeric": "Endid di-rhifol: {entity}", "entity_not_found": "Endid ddim ar gael: {entity}" } diff --git a/translations/fr.json b/translations/fr.json index da514571b3..9f1b4c4f68 100644 --- a/translations/fr.json +++ b/translations/fr.json @@ -578,7 +578,7 @@ }, "related-items": { "area": "Zone", - "automation": "Parties des automations suivantes", + "automation": "Partie des automatisations suivantes", "device": "Appareil", "entity": "Entités liées", "group": "Partie des groupes suivants", @@ -1050,16 +1050,16 @@ }, "picker": { "add_automation": "Ajouter une automation", - "delete_automation": "Supprimer l'automation", - "delete_confirm": "Êtes-vous sûr de vouloir supprimer cette automation ?", - "edit_automation": "Modifier l'automation", + "delete_automation": "Supprimer l'automatisation", + "delete_confirm": "Voulez-vous vraiment supprimer cette automatisation ?", + "edit_automation": "Modifier l'automatisation", "header": "Éditeur d'automation", "introduction": "L'éditeur d'automations vous permet de créer et modifier des automations. Veuillez lire les instructions ci-dessous pour vous assurer d'avoir configuré Home Assistant correctement.", - "learn_more": "En savoir plus sur les automations", + "learn_more": "En savoir plus sur les automatisations", "no_automations": "Il n'y a aucune automation modifiable.", - "only_editable": "Seules les automations définies dans automations.yaml sont modifiables.", + "only_editable": "Seules les automatisations définies dans automations.yaml sont modifiables.", "pick_automation": "Choisissez l'automation à modifier", - "show_info_automation": "Afficher des informations sur l'automation" + "show_info_automation": "Afficher des informations sur l'automatisation" } }, "cloud": { @@ -1122,7 +1122,7 @@ "loading": "Chargement ...", "manage": "Gérer", "no_hooks_yet": "Il semble que vous n'ayez pas encore de Webhooks. Commencez en configurer un ", - "no_hooks_yet_link_automation": "automation du Webhook", + "no_hooks_yet_link_automation": "automatisation webhook", "no_hooks_yet_link_integration": "intégration basée sur un Webhook", "no_hooks_yet2": "ou en créant un", "title": "Webhooks" @@ -1298,12 +1298,12 @@ "actions": { "caption": "Quand quelque chose est déclenché ..." }, - "automations": "Automations", + "automations": "Automatisations", "conditions": { "caption": "Ne faire quelque chose que si ..." }, - "create": "Créer une automation avec l'appareil", - "no_automations": "Aucune automation", + "create": "Créer une automatisation avec l'appareil", + "no_automations": "Aucune automatisation", "no_device_automations": "Aucune automatisation n'est disponible pour cet appareil.", "triggers": { "caption": "Faire quelque chose quand ..." @@ -1676,7 +1676,7 @@ "description": "Redémarrer et arrêter le serveur Home Assistant", "section": { "reloading": { - "automation": "Recharger les automations", + "automation": "Recharger les automatisations", "core": "Recharger l'emplacement et les personnalisations", "group": "Recharger les groupes", "heading": "Rechargement de la configuration", @@ -1862,7 +1862,7 @@ "name": "Nom", "new_zone": "Nouvelle zone", "passive": "Passif", - "passive_note": "Les zones passives sont cachées dans l'interface utilisateur et ne sont pas utilisées comme emplacement pour les appareils suivis. Elles sont utiles si vous voulez les utiliser pour des automations.", + "passive_note": "Les zones passives sont cachées dans l'interface utilisateur et ne sont pas utilisées comme emplacement pour les appareils suivis. Elles sont utiles si vous voulez les utiliser pour des automatisations.", "radius": "Rayon", "required_error_msg": "Ce champ est requis", "update": "Mettre à jour" @@ -1871,7 +1871,7 @@ "edit_home_zone_narrow": "Le rayon de la zone d'habitation ne peut pas encore être modifié depuis le frontend. L'emplacement peut être modifié par rapport à la configuration générale.", "go_to_core_config": "Configuration générale", "home_zone_core_config": "L'emplacement de votre zone d'habitation est modifiable à partir de la page de configuration générale. Le rayon de la zone d'habitation ne peut pas encore être modifié depuis le frontend. Voulez-vous passer à la configuration générale ?", - "introduction": "Les zones vous permettent de spécifier certaines régions sur la terre. Lorsqu'une personne se trouve dans une zone, l'état prend le nom de la zone. Les zones peuvent également être utilisées comme déclencheur ou condition dans les configurations d'automation.", + "introduction": "Les zones vous permettent de spécifier certaines régions sur la terre. Lorsqu'une personne se trouve dans une zone, l'état prend le nom de la zone. Les zones peuvent également être utilisées comme déclencheur ou condition dans les configurations d'automatisation.", "no_zones_created_yet": "Il semble que vous n'ayez pas encore créé de zones." }, "zwave": { @@ -2263,7 +2263,7 @@ "header": "Configuration de la carte", "move": "Déplacer", "options": "Plus d'options", - "pick_card": "Choisissez l'automation à ajouter", + "pick_card": "Quelle carte aimeriez-vous ajouter ?", "pick_card_view_title": "Quelle carte souhaitez-vous ajouter à votre vue {name} ?", "save": "Enregistrer", "show_code_editor": "Afficher l'éditeur de code", diff --git a/translations/hu.json b/translations/hu.json index 84a5e4971d..eb950a26fe 100644 --- a/translations/hu.json +++ b/translations/hu.json @@ -537,9 +537,11 @@ "common": { "cancel": "Mégse", "close": "Bezárás", + "delete": "Törlés", "loading": "Betöltés", "no": "Nem", "save": "Mentés", + "successfully_deleted": "Sikeresen törölve", "successfully_saved": "Sikeresen elmentve", "yes": "Igen" }, @@ -2076,7 +2078,7 @@ "url": "Ablak megnyitása: {url_path}" }, "safe-mode": { - "description": "A Home Assistant a konfiguráció betöltése közben bajba került, és most csökkentett módban fut. Vessen egy pillantást a hibanaplóra, hogy lássa, mi romlott el.", + "description": "A Home Assistant a konfiguráció betöltése során problémába ütközött, ezért most csökkentett módban fut. Vess egy pillantást a hibanaplóra, hogy megtudd, mi romlott el.", "header": "Csökkentett mód aktiválva", "show_errors": "Hibák megjelenítése" }, @@ -2171,7 +2173,7 @@ }, "glance": { "columns": "Oszlopok", - "description": "A Pillantás kártyával több érzékelő csoportosítható egy kompakt nézetbe.", + "description": "A Pillantás kártyával több érzékelő csoportosítható egy kompakt áttekintő nézetbe.", "name": "Pillantás" }, "history-graph": { @@ -2219,6 +2221,7 @@ "name": "Kép" }, "plant-status": { + "description": "A Növényállapot kártya az összes kedves botanikus számára készült.", "name": "Növény állapota" }, "sensor": { diff --git a/translations/is.json b/translations/is.json index 982f141224..fe8761dd5e 100644 --- a/translations/is.json +++ b/translations/is.json @@ -521,7 +521,8 @@ "add_dialog": { "add": "Bæta við", "name": "Nafn" - } + }, + "clear": "Hreinsa" }, "device-picker": { "clear": "Hreinsa", @@ -538,6 +539,10 @@ "loading_history": "Hleð stöðusögu...", "no_history_found": "Engin stöðusaga fannst." }, + "related-items": { + "device": "Tæki", + "integration": "Samþætting" + }, "relative_time": { "duration": { "day": "{count} {count, plural,\n one {dagur}\n other {dagar}\n}", @@ -557,7 +562,8 @@ "dialogs": { "config_entry_system_options": { "enable_new_entities_label": "Virkja einingar sem nýlega var bætt við", - "title": "Kerfisvalkostir" + "title": "Kerfisvalkostir", + "update": "Uppfæra" }, "confirmation": { "cancel": "Hætta við", @@ -565,6 +571,7 @@ "title": "Ertu viss?" }, "entity_registry": { + "dismiss": "Vísa frá", "editor": { "delete": "Eyða", "update": "Uppfæra" @@ -577,15 +584,23 @@ }, "helper_settings": { "generic": { + "icon": "Táknmynd", "name": "Nafn" }, + "input_datetime": { + "date": "Dagsetning", + "has_date": "Dagsetning", + "has_time": "Tími", + "time": "Tími" + }, "input_select": { "add": "Bæta við" }, "input_text": { "password": "Lykilorð", "text": "Texti" - } + }, + "required_error_msg": "þetta er skilyrtur reitur" }, "more_info_control": { "script": { @@ -1061,6 +1076,7 @@ "entities": "Einingar" }, "info": "Upplýsingar um tæki", + "name": "Nafn", "scene": { "no_scenes": "Engar senur", "scenes": "Senur" @@ -1128,6 +1144,7 @@ "caption": "Samþættingar", "config_entry": { "area": "Í {area}", + "delete_button": "Eyða {integration}", "delete_confirm": "Ertu viss um að þú viljir eyða þessari samþættingu?", "device_unavailable": "Tæki ekki tiltækt", "entity_unavailable": "Eining ekki tiltæk", @@ -1170,10 +1187,14 @@ "introduction": "Hér er mögulegt að stilla af íhluti og Home Assistant. Því miður er ekki hægt að breyta öllu í gegnum viðmótið ennþá, en við erum að vinna í því.", "lovelace": { "dashboards": { + "conf_mode": { + "yaml": "YAML skrá" + }, "detail": { "create": "Stofna", "delete": "Eyða", "dismiss": "Loka", + "icon": "Táknmynd", "title": "Titill", "update": "Uppfæra" }, @@ -1373,7 +1394,11 @@ "detail": { "create": "Stofna", "delete": "Eyða", + "icon": "Táknmynd", + "latitude": "Breiddargráða", + "longitude": "Lengdargráða", "name": "Nafn", + "radius": "Radíus", "update": "Uppfæra" } }, @@ -1440,6 +1465,8 @@ "copied": "Afritað á klemmuspjald", "copy_entity_state": "Afrita stöðu", "more_info": "Frekari upplýsingar", + "set_state": "Setja stöðu", + "state": "Staða", "title": "Stöður" }, "templates": { @@ -1536,6 +1563,7 @@ "show_icon": "Birta táknmynd?", "show_name": "Birta nafn?", "show_state": "Birta stöðu?", + "state": "Staða", "theme": "Þema", "title": "Titill", "unit": "Eining", @@ -1840,6 +1868,7 @@ "link_promo": "Hjálpa við að þýða" }, "logout": "Skrá út", + "logout_title": "Skrá út?", "long_lived_access_tokens": { "confirm_delete": "Ertu viss um að þú viljir eyða aðgangstóka fyrir {name}?", "create": "Búa til tóka", diff --git a/translations/it.json b/translations/it.json index dfc30e7502..5ccc70477e 100644 --- a/translations/it.json +++ b/translations/it.json @@ -623,7 +623,7 @@ "dismiss": "Annullare", "editor": { "confirm_delete": "Sei sicuro di voler eliminare questa voce?", - "delete": "ELIMINA", + "delete": "Elimina", "enabled_cause": "Disabilitato da {cause}.", "enabled_description": "Le entità disabilitate non saranno aggiunte a Home Assistant", "enabled_label": "Abilita entità", @@ -633,7 +633,7 @@ "name": "Sostituzione nome", "note": "Nota: questo potrebbe non funzionare ancora con tutte le integrazioni.", "unavailable": "Questa entità non è attualmente disponibile.", - "update": "AGGIORNA" + "update": "Aggiorna" }, "no_unique_id": "Questa entità non ha un ID univoco, pertanto le sue impostazioni non possono essere gestite dall'Interfaccia Utente.", "related": "Relazionato", @@ -666,7 +666,7 @@ "min": "Valore minimo", "mode": "Modalità di visualizzazione", "slider": "Cursore", - "step": "Dimensione del passo del cursore", + "step": "Dimensione del passo", "unit_of_measurement": "Unità di misura" }, "input_select": { @@ -818,14 +818,14 @@ }, "description": "Panoramica di tutte le aree della tua casa.", "editor": { - "create": "CREA", + "create": "Crea", "default_name": "Nuova area", - "delete": "ELIMINA", - "update": "AGGIORNA" + "delete": "Elimina", + "update": "Aggiorna" }, "no_areas": "Sembra che tu non abbia ancora delle aree!", "picker": { - "create_area": "CREA AREA", + "create_area": "Crea Area", "header": "Aree", "integrations_page": "Integrazioni", "introduction": "Le aree sono utilizzate per organizzare dove sono i dispositivi. Queste informazioni saranno utilizzate in Home Assistant per aiutarti ad organizzare la tua interfaccia, permessi e integrazioni con altri sistemi.", diff --git a/translations/nl.json b/translations/nl.json index 08e9ca1758..f214a96924 100644 --- a/translations/nl.json +++ b/translations/nl.json @@ -537,9 +537,11 @@ "common": { "cancel": "Annuleren", "close": "Sluiten", + "delete": "Verwijderen", "loading": "Bezig met laden", "no": "Nee", "save": "Opslaan", + "successfully_deleted": "Succesvol verwijderd", "successfully_saved": "Succesvol opgeslagen", "yes": "Ja" }, @@ -621,7 +623,7 @@ "dismiss": "Sluiten", "editor": { "confirm_delete": "Weet je zeker dat je dit item wilt verwijderen?", - "delete": "VERWIJDEREN", + "delete": "Verwijderen", "enabled_cause": "Uitgeschakeld vanwege {cause}", "enabled_description": "Uitgeschakelde entiteiten zullen niet aan Home Assistant worden toegevoegd", "enabled_label": "Schakel entiteit in", @@ -631,7 +633,7 @@ "name": "Naam overschrijven", "note": "Nota bene: dit werkt mogelijk nog niet met alle integraties.", "unavailable": "Deze entiteit is momenteel niet beschikbaar.", - "update": "BIJWERKEN" + "update": "Bijwerken" }, "no_unique_id": "Deze entiteit heeft geen unieke ID, daarom kunnen de instellingen niet worden beheerd vanuit de gebruikersinterface.", "related": "Gerelateerd", @@ -651,8 +653,12 @@ "name": "Naam" }, "input_datetime": { + "date": "Datum", + "datetime": "Datum en tijd", "has_date": "Datum", - "has_time": "Tijd" + "has_time": "Tijd", + "mode": "Wat wil je invoeren", + "time": "Tijd" }, "input_number": { "box": "Invoerveld", @@ -804,16 +810,20 @@ "areas": { "caption": "Gebieden", "create_area": "MAAK GEBIED", + "delete": { + "confirmation_text": "Alle apparaten in dit gebied zullen niet meer toegewezen zijn.", + "confirmation_title": "Weet je zeker dat je dit gebied wilt verwijderen?" + }, "description": "Overzicht van alle gebieden in je huis.", "editor": { - "create": "MAKEN", + "create": "Aanmaken", "default_name": "Nieuw Gebied", - "delete": "VERWIJDEREN", - "update": "BIJWERKEN" + "delete": "Verwijderen", + "update": "Bijwerken" }, "no_areas": "Het lijkt erop dat je nog geen gebieden hebt!", "picker": { - "create_area": "GEBIED MAKEN", + "create_area": "Gebied maken", "header": "Gebieden", "integrations_page": "Integratiespagina", "introduction": "Gebieden worden gebruikt om te bepalen waar apparaten zijn. Deze informatie wordt overal in de Home Assistant gebruikt om je te helpen bij het organiseren van je interface, machtigingen en integraties met andere systemen.", @@ -1300,6 +1310,7 @@ "automations": "Automatiseringen", "cant_edit": "Je kunt alleen items bewerken die in de gebruikersinterface zijn gemaakt.", "caption": "Apparaten", + "confirm_delete": "Weet je zeker dat je dit apparaat wilt verwijderen?", "confirm_rename_entity_ids": "Wil je ook de entiteits-ID's van je entiteiten hernoemen?", "data_table": { "area": "Gebied", @@ -1307,8 +1318,10 @@ "device": "Apparaat", "integration": "Integratie", "manufacturer": "Fabrikant", - "model": "Model" + "model": "Model", + "no_devices": "Geen apparaten" }, + "delete": "Verwijderen", "description": "Beheer verbonden apparaten", "details": "Hier zijn alle details van uw apparaat", "device_not_found": "Apparaat niet gevonden.", @@ -1382,6 +1395,7 @@ "introduction2": "Gebruik het entiteitenregister om de naam te overschrijven, de entiteits-ID te wijzigen of het item te verwijderen uit Home Assistant.", "remove_selected": { "button": "Verwijder geselecteerde", + "confirm_partly_title": "Alleen {number} geselecteerde entiteiten kunnen worden verwijderd.", "confirm_text": "Je moet ze zelf nog verwijderen uit je Lovelace-configuratie en automatiseringen als ze deze entiteiten bevatten.", "confirm_title": "Wilt je {number} entiteiten verwijderen?" }, @@ -1391,6 +1405,7 @@ "disabled": "Uitgeschakeld", "ok": "OK", "readonly": "Alleen-lezen", + "restored": "Hersteld", "unavailable": "Onbeschikbaar" }, "unavailable": "(niet beschikbaar)" @@ -1455,6 +1470,7 @@ }, "failed_create_area": "Kan het gebied niet maken.", "finish": "Voltooien", + "loading_first_time": "Even geduld a.u.b. terwijl de integratie wordt geïnstalleerd", "name_new_area": "Naam van het nieuwe gebied?", "not_all_required_fields": "Niet alle verplichte velden zijn ingevuld.", "submit": "Opslaan" @@ -1493,14 +1509,20 @@ "yaml": "YAML-bestand" }, "confirm_delete": "Weet je zeker dat je deze dashboard wilt verwijderen?", + "default_dashboard": "Dit is het standaard dashboard", "detail": { "create": "Aanmaken", "delete": "Verwijderen", "dismiss": "Sluiten", "edit_dashboard": "Dashboard bewerken", + "icon": "Pictogram", "new_dashboard": "Nieuw dashboard toevoegen", + "remove_default": "Verwijderen als standaard op dit apparaat", "require_admin": "Alleen beheerder", + "set_default": "Als standaard instellen op dit apparaat", "show_sidebar": "Toon in de zijbalk", + "title": "Titel", + "title_required": "Titel is vereist.", "update": "Bijwerken", "url": "Url", "url_error_msg": "De URL moet een - bevatten en mag geen spaties of speciale tekens bevatten, behalve _ en -" @@ -1520,21 +1542,28 @@ }, "description": "Configureer je Lovelace-dashboards", "resources": { + "cant_edit_yaml": "Je gebruikt Lovelace in YAML-modus, daarom kun je je bronnen niet beheren via de gebruikersinterface. Beheer ze in configuration.yaml.", "caption": "Bronnen", + "confirm_delete": "Weet u zeker dat u deze bron wilt verwijderen?", "detail": { "create": "Aanmaken", "delete": "Verwijder", "dismiss": "Sluiten", + "new_resource": "Voeg nieuwe bron toe", + "type": "Type bron", "update": "Bijwerken", "url": "Url", "url_error_msg": "Url is een verplicht veld", - "warning_header": "Wees voorzichtig!" + "warning_header": "Wees voorzichtig!", + "warning_text": "Het toevoegen van bronnen kan gevaarlijk zijn, zorg ervoor dat u de bron van de bron kent en vertrouw ze. Slechte bronnen kunnen uw systeem ernstig beschadigen." }, "picker": { + "add_resource": "Voeg bron toe", "headers": { "type": "Type", "url": "Url" - } + }, + "no_resources": "Geen Lovelace bronnen" }, "refresh_body": "Je moet de pagina vernieuwen om de verwijdering te voltooien. Wil je nu vernieuwen?", "refresh_header": "Wil je verversen?", @@ -2070,10 +2099,18 @@ "name": "Alarm paneel" }, "button": { + "description": "Met de Button-kaart kun je knoppen toevoegen om taken uit te voeren.", "name": "Knop" }, "conditional": { - "name": "Conditioneel" + "card": "Kaart", + "change_type": "Wijzig type", + "condition_explanation": "De kaart wordt weergegeven als aan ALLE onderstaande voorwaarden is voldaan.", + "conditions": "Voorwaarden", + "current_state": "huidige", + "name": "Conditioneel", + "state_equal": "Staat is gelijk aan", + "state_not_equal": "Staat is niet gelijk aan" }, "config": { "optional": "Optioneel", @@ -2091,6 +2128,7 @@ "name": "Entiteit-filter" }, "gauge": { + "description": "De meterkaart is een basiskaart waarmee u sensorgegevens visueel kunt zien.", "name": "Meter", "severity": { "define": "Ernst definiëren?", @@ -2114,6 +2152,7 @@ "maximum": "Maximaal", "minimum": "Minimum", "name": "Naam", + "no_theme": "Geen thema", "refresh_interval": "Vernieuwingsinterval", "show_icon": "Pictogram Weergeven?", "show_name": "Naam weergeven?", @@ -2171,27 +2210,33 @@ "name": "toestand plant" }, "sensor": { + "description": "De Sensor-kaart geeft u een snel overzicht van de status van uw sensoren met een optionele grafiek om veranderingen in de tijd te visualiseren.", "graph_detail": "Grafiek Detail", "graph_type": "Grafiektype", "name": "Sensor" }, "shopping-list": { + "description": "Met de Shopping List-kaart kunt u items aan uw boodschappenlijst toevoegen, bewerken, afvinken en wissen.", "integration_not_loaded": "Voor deze kaart moet de integratie 'shopping_list' zijn ingesteld.", "name": "Boodschappenlijst" }, "thermostat": { + "description": "De Thermostat-kaart geeft controle over uw klimaateenheid. Hiermee kunt u de temperatuur en modus van de entiteit wijzigen.", "name": "Thermostaat" }, "vertical-stack": { + "description": "Met de Vertical Stack-kaart kunt u meerdere kaarten groeperen, zodat ze altijd in dezelfde kolom zitten.", "name": "Verticale stapel" }, "weather-forecast": { + "description": "De Weather Forecast-kaart geeft het weer weer. Erg handig om op te nemen op interfaces die mensen aan de muur hangen.", "name": "Weersverwachting" } }, "edit_card": { "add": "Kaart toevoegen", "delete": "Verwijder kaart", + "duplicate": "Dubbele kaart", "edit": "Bewerken", "header": "Kaart configuratie", "move": "Verplaatsen", @@ -2217,7 +2262,11 @@ "move_left": "Verplaats weergave naar links", "move_right": "Verplaats weergave naar rechts", "tab_badges": "Badges", - "tab_settings": "instellingen" + "tab_settings": "instellingen", + "tab_visibility": "Zichtbaarheid", + "visibility": { + "select_users": "Selecteer welke gebruikers deze weergave in de navigatie moeten zien" + } }, "header": "Bewerk UI", "menu": { @@ -2251,7 +2300,8 @@ "header": "Neem de controle over je Lovelace UI", "para": "Home Assistant onderhoudt je gebruikersinterface en update die met nieuwe entiteiten of Lovelace-onderdelen wanneer deze beschikbaar zijn. Als je het beheer overneemt, zullen we niet langer automatisch wijzigingen aanbrengen.", "para_sure": "Weet je zeker dat je de controle wilt over je gebruikersinterface?", - "save": "Neem over" + "save": "Neem over", + "yaml_config": "Om je te helpen te beginnen, hier is de huidige configuratie van dit dashboard:" }, "suggest_card": { "add": "Voeg toe aan de Lovelace gebruikersinterface", @@ -2261,7 +2311,8 @@ "view": { "panel_mode": { "description": "Hierdoor wordt de eerste kaart op volledige breedte weergegeven; andere kaarten in deze weergave worden niet weergegeven.", - "title": "Paneelmodus?" + "title": "Paneelmodus?", + "warning_multiple_cards": "Deze weergave bevat meer dan één kaart, maar een paneelweergave kan slechts 1 kaart tonen." } } }, @@ -2271,9 +2322,14 @@ "exit_edit_mode": "UI-bewerkingsmodus afsluiten", "help": "Help", "refresh": "Vernieuwen", + "reload_resources": "Herlaad Lovelace gegevens", "unused_entities": "Ongebruikte entiteiten" }, "reload_lovelace": "Lovelace herladen", + "reload_resources": { + "refresh_body": "Je moet de pagina vernieuwen om het herladen te voltooien, wil je nu vernieuwen?", + "refresh_header": "Wil je de gegevens vernieuwen?" + }, "unused_entities": { "available_entities": "Dit zijn de entiteiten die je beschikbaar hebt, maar die nog niet in je Lovelace UI staan.", "domain": "Domein", @@ -2285,6 +2341,8 @@ }, "views": { "confirm_delete": "Weergave verwijderen?", + "confirm_delete_existing_cards": "Als u deze weergave verwijdert, worden ook de kaarten verwijderd", + "confirm_delete_text": "Weet u zeker dat u uw '{naam}'-weergave wilt verwijderen?", "existing_cards": "U kunt een weergave met kaarten niet verwijderen. Verwijder eerst de kaarten." }, "warning": { diff --git a/translations/sl.json b/translations/sl.json index 31de2db18d..4c37ee4803 100644 --- a/translations/sl.json +++ b/translations/sl.json @@ -537,9 +537,11 @@ "common": { "cancel": "Prekliči", "close": "Zapri", + "delete": "Izbriši", "loading": "Nalaganje", "no": "Ne", "save": "Shrani", + "successfully_deleted": "Uspešno odstranjeno", "successfully_saved": "Shranjeno", "yes": "Da" }, @@ -1310,6 +1312,7 @@ "automations": "Avtomatizacije", "cant_edit": "Urejate lahko samo elemente, ki so ustvarjeni v uporabniškem vmesniku.", "caption": "Naprave", + "confirm_delete": "Ali ste prepričani, da želite odstraniti to napravo?", "confirm_rename_entity_ids": "Ali želite preimenovati tudi ID entitete vaših entitet?", "data_table": { "area": "Območje", @@ -1320,6 +1323,7 @@ "model": "Model", "no_devices": "Brez naprav" }, + "delete": "Izbriši", "description": "Upravljajte povezane naprave", "details": "Tu so vse podrobnosti vaše naprave.", "device_not_found": "Naprave ni bilo mogoče najti", @@ -2157,6 +2161,7 @@ "maximum": "Največ", "minimum": "Najmanj", "name": "Ime", + "no_theme": "Brez teme", "refresh_interval": "Interval osveževanja", "show_icon": "Prikaži ikono?", "show_name": "Prikaži ime?", @@ -2330,7 +2335,8 @@ "view": { "panel_mode": { "description": "To prikaže prvo kartico v polni širini, ostale ne bodo prikazane.", - "title": "Način panel?" + "title": "Način panel?", + "warning_multiple_cards": "Ta pogled vsebuje več kartic, na plošči je lahko prikazana največ ena kartica." } } }, diff --git a/translations/tr.json b/translations/tr.json index b2825bd1b5..30bfec4b73 100644 --- a/translations/tr.json +++ b/translations/tr.json @@ -535,9 +535,11 @@ "common": { "cancel": "İptal", "close": "Kapat", + "delete": "Sil", "loading": "Yükleniyor", "no": "Hayır", "save": "Kaydet", + "successfully_deleted": "Başarıyla silindi", "successfully_saved": "Başarıyla kaydedildi", "yes": "Evet" }, @@ -1493,6 +1495,8 @@ }, "description": "Lovelace kontrol panellerinizi yapılandırın", "resources": { + "caption": "Kaynaklar", + "confirm_delete": "Bu kaynağı silmek istediğinizden emin misiniz?", "detail": { "create": "Oluştur", "delete": "Sil", @@ -1501,7 +1505,8 @@ "type": "Kaynak tipi", "update": "Güncelle", "url": "URL", - "url_error_msg": "URL zorunlu bir alandır" + "url_error_msg": "URL zorunlu bir alandır", + "warning_header": "Dikkatli olun!" }, "picker": { "add_resource": "Kaynak ekle", @@ -1510,6 +1515,12 @@ "url": "URL" }, "no_resources": "Kaynak yok" + }, + "refresh_header": "Yenilemek istiyor musunuz?", + "types": { + "html": "HTML (kullanımdan kaldırıldı)", + "js": "JavaScript Dosyası (kullanımdan kaldırıldı)", + "module": "JavaScript Modülü" } } }, diff --git a/translations/uk.json b/translations/uk.json index f7d9625df0..0f7066427c 100644 --- a/translations/uk.json +++ b/translations/uk.json @@ -533,9 +533,11 @@ }, "common": { "cancel": "Скасувати", + "delete": "Видалити", "loading": "Завантаження", "no": "Ні", "save": "Зберегти", + "successfully_deleted": "Успішно видалено", "successfully_saved": "Успішно збережено", "yes": "Так" }, @@ -1190,6 +1192,7 @@ }, "automations": "Автоматизації", "caption": "Пристрої", + "confirm_delete": "Ви впевнені, що хочете видалити цей пристрій?", "confirm_rename_entity_ids": "Ви також хочете перейменувати ідентифікатор сутності з ваших сутностей?", "data_table": { "area": "Приміщення", @@ -1200,6 +1203,7 @@ "model": "Модель", "no_devices": "Немає пристроїв" }, + "delete": "Видалити", "description": "Керування підключеними пристроями", "details": "Тут ви знайдете всі деталі вашого пристрою.", "device_not_found": "Пристрій не знайдено", @@ -1828,13 +1832,16 @@ "icon": "Іконка", "icon_height": "Висота значка", "image": "Шлях зображення", + "manual": "Вручну", "maximum": "Максимум", "minimum": "Мінімум", "name": "Назва", + "no_theme": "Немає теми", "refresh_interval": "Інтервал оновлення", "show_icon": "Показати значок?", "show_name": "Показати назву?", "show_state": "Показати стан?", + "state": "Стан", "tap_action": "Дія при дотику", "theme": "Тема", "title": "Заголовок", @@ -1860,6 +1867,7 @@ "map": { "dark_mode": "Темний режим?", "default_zoom": "Масштабування за замовчуванням", + "description": "Карта карти дозволяє відображати об'єкти на карті.", "geo_location_sources": "Джерела геолокації", "name": "Мапа", "source": "Джерело" @@ -1892,6 +1900,7 @@ "name": "Датчик" }, "shopping-list": { + "description": "Картка списку покупок дозволяє додавати, редагувати, вилучати та очищати предмети зі списку покупок.", "name": "Список покупок" }, "thermostat": { @@ -1903,7 +1912,7 @@ "name": "Вертикальний стек" }, "weather-forecast": { - "description": "Карта прогнозу погоди відображає погоду. Дуже корисно включити на інтерфейси циз людей що відображаються на стіні.", + "description": "Карта прогнозу погоди відображає погоду. Дуже корисно включити на інтерфейси цих людей що відображаються на стіні.", "name": "Прогноз погоди" } }, @@ -1972,7 +1981,8 @@ "view": { "panel_mode": { "description": "Це робить першу карту на повну ширину; інші карти в цьому вікні не будуть надані.", - "title": "Панельний режим?" + "title": "Панельний режим?", + "warning_multiple_cards": "Цей вигляд містить більше однієї картки, але на панелі подання може відображатися лише 1 картка." } } }, diff --git a/translations/zh-Hans.json b/translations/zh-Hans.json index 26acdbb792..9fc01195b8 100644 --- a/translations/zh-Hans.json +++ b/translations/zh-Hans.json @@ -537,9 +537,11 @@ "common": { "cancel": "取消", "close": "关闭", + "delete": "删除", "loading": "加载中", "no": "否", "save": "保存", + "successfully_deleted": "已成功删除", "successfully_saved": "保存成功", "yes": "是" }, From ddb525f6cdee0206b7d82c3133f888b1a383f90c Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Mon, 30 Mar 2020 11:38:54 +0200 Subject: [PATCH 55/66] Fix hass.io panel for older version (#5365) * Fix hass.io panel for older version * Fix lint --- hassio/src/addon-store/hassio-addon-repository.ts | 2 +- hassio/src/addon-view/hassio-addon-info.ts | 3 +-- hassio/src/dashboard/hassio-addons.ts | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/hassio/src/addon-store/hassio-addon-repository.ts b/hassio/src/addon-store/hassio-addon-repository.ts index 2e789bcace..5ff2ee32ee 100644 --- a/hassio/src/addon-store/hassio-addon-repository.ts +++ b/hassio/src/addon-store/hassio-addon-repository.ts @@ -93,7 +93,7 @@ class HassioAddonRepositoryEl extends LitElement { ? "not_available" : ""} .iconImage=${atLeastVersion( - this.hass.connection.haVersion, + this.hass.config.version, 0, 105 ) && addon.icon diff --git a/hassio/src/addon-view/hassio-addon-info.ts b/hassio/src/addon-view/hassio-addon-info.ts index cc2bf2e0bf..04b736f34f 100644 --- a/hassio/src/addon-view/hassio-addon-info.ts +++ b/hassio/src/addon-view/hassio-addon-info.ts @@ -661,8 +661,7 @@ class HassioAddonInfo extends LitElement { private get _computeCannotIngressSidebar(): boolean { return ( - !this.addon.ingress || - !atLeastVersion(this.hass.connection.haVersion, 0, 92) + !this.addon.ingress || !atLeastVersion(this.hass.config.version, 0, 92) ); } diff --git a/hassio/src/dashboard/hassio-addons.ts b/hassio/src/dashboard/hassio-addons.ts index 908cee988a..c59edcfc5e 100644 --- a/hassio/src/dashboard/hassio-addons.ts +++ b/hassio/src/dashboard/hassio-addons.ts @@ -67,7 +67,7 @@ class HassioAddons extends LitElement { ? "running" : "stopped"} .iconImage=${atLeastVersion( - this.hass.connection.haVersion, + this.hass.config.version, 0, 105 ) && addon.icon From f6dac98abd4d71c17a6418a53e348751e0bcaba4 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Mon, 30 Mar 2020 14:21:21 +0200 Subject: [PATCH 56/66] Update layout of device info page (#5342) * Update layout of device info page * Comments *
and simplify layout * Update ha-config-device-page.ts --- src/components/data-table/ha-data-table.ts | 19 +- src/components/ha-sidebar.ts | 1 + src/data/entity_registry.ts | 10 + .../devices/device-detail/ha-device-card.ts | 133 ------ .../device-detail/ha-device-entities-card.ts | 6 + .../device-detail/ha-device-info-card.ts | 118 ++++++ .../config/devices/ha-config-device-page.ts | 396 +++++++++++------- .../devices/ha-config-devices-dashboard.ts | 59 ++- .../config/devices/ha-devices-data-table.ts | 16 +- 9 files changed, 442 insertions(+), 316 deletions(-) delete mode 100644 src/panels/config/devices/device-detail/ha-device-card.ts create mode 100644 src/panels/config/devices/device-detail/ha-device-info-card.ts diff --git a/src/components/data-table/ha-data-table.ts b/src/components/data-table/ha-data-table.ts index 6fef89eb4a..f68793bb04 100644 --- a/src/components/data-table/ha-data-table.ts +++ b/src/components/data-table/ha-data-table.ts @@ -72,6 +72,7 @@ export interface DataTableColumnData extends DataTableSortColumnData { type?: "numeric" | "icon"; template?: (data: any, row: T) => TemplateResult | string; width?: string; + maxWidth?: string; grows?: boolean; } @@ -241,9 +242,8 @@ export class HaDataTable extends LitElement { class="mdc-data-table__header-cell ${classMap(classes)}" style=${column.width ? styleMap({ - [column.grows ? "minWidth" : "width"]: String( - column.width - ), + [column.grows ? "minWidth" : "width"]: column.width, + maxWidth: column.maxWidth || "", }) : ""} role="columnheader" @@ -329,7 +329,10 @@ export class HaDataTable extends LitElement { ? styleMap({ [column.grows ? "minWidth" - : "width"]: String(column.width), + : "width"]: column.width, + maxWidth: column.maxWidth + ? column.maxWidth + : "", }) : ""} > @@ -532,6 +535,7 @@ export class HaDataTable extends LitElement { overflow: hidden; text-overflow: ellipsis; flex-shrink: 0; + box-sizing: border-box; } .mdc-data-table__cell.mdc-data-table__cell--icon { @@ -544,7 +548,7 @@ export class HaDataTable extends LitElement { padding-left: 16px; /* @noflip */ padding-right: 0; - width: 40px; + width: 56px; } [dir="rtl"] .mdc-data-table__header-cell--checkbox, .mdc-data-table__header-cell--checkbox[dir="rtl"], @@ -591,7 +595,7 @@ export class HaDataTable extends LitElement { .mdc-data-table__header-cell--icon, .mdc-data-table__cell--icon { - width: 24px; + width: 54px; } .mdc-data-table__header-cell.mdc-data-table__header-cell--icon { @@ -695,6 +699,9 @@ export class HaDataTable extends LitElement { .center { text-align: center; } + .secondary { + color: var(--secondary-text-color); + } .scroller { display: flex; position: relative; diff --git a/src/components/ha-sidebar.ts b/src/components/ha-sidebar.ts index 321a703bda..dd27336fa8 100644 --- a/src/components/ha-sidebar.ts +++ b/src/components/ha-sidebar.ts @@ -530,6 +530,7 @@ class HaSidebar extends LitElement { overflow-x: hidden; scrollbar-color: var(--scrollbar-thumb-color) transparent; scrollbar-width: thin; + background: none; } a { diff --git a/src/data/entity_registry.ts b/src/data/entity_registry.ts index c4b94aab21..18a1512b41 100644 --- a/src/data/entity_registry.ts +++ b/src/data/entity_registry.ts @@ -27,6 +27,16 @@ export interface EntityRegistryEntryUpdateParams { new_entity_id?: string; } +export const findBatteryEntity = ( + hass: HomeAssistant, + entities: EntityRegistryEntry[] +): EntityRegistryEntry | undefined => + entities.find( + (entity) => + hass.states[entity.entity_id] && + hass.states[entity.entity_id].attributes.device_class === "battery" + ); + export const computeEntityRegistryName = ( hass: HomeAssistant, entry: EntityRegistryEntry diff --git a/src/panels/config/devices/device-detail/ha-device-card.ts b/src/panels/config/devices/device-detail/ha-device-card.ts deleted file mode 100644 index 141e3389d2..0000000000 --- a/src/panels/config/devices/device-detail/ha-device-card.ts +++ /dev/null @@ -1,133 +0,0 @@ -import { - DeviceRegistryEntry, - computeDeviceName, -} from "../../../../data/device_registry"; -import { loadDeviceRegistryDetailDialog } from "../../../../dialogs/device-registry-detail/show-dialog-device-registry-detail"; -import { - LitElement, - html, - customElement, - property, - TemplateResult, - CSSResult, - css, -} from "lit-element"; -import { HomeAssistant } from "../../../../types"; -import { AreaRegistryEntry } from "../../../../data/area_registry"; - -@customElement("ha-device-card") -export class HaDeviceCard extends LitElement { - @property() public hass!: HomeAssistant; - @property() public device!: DeviceRegistryEntry; - @property() public devices!: DeviceRegistryEntry[]; - @property() public areas!: AreaRegistryEntry[]; - @property() public narrow!: boolean; - - protected render(): TemplateResult { - return html` -
- ${this.device.model - ? html` -
${this.device.model}
- ` - : ""} - ${this.device.manufacturer - ? html` -
- ${this.hass.localize( - "ui.panel.config.integrations.config_entry.manuf", - "manufacturer", - this.device.manufacturer - )} -
- ` - : ""} - ${this.device.area_id - ? html` -
-
- ${this.hass.localize( - "ui.panel.config.integrations.config_entry.area", - "area", - this._computeArea(this.areas, this.device) - )} -
-
- ` - : ""} - ${this.device.via_device_id - ? html` -
- ${this.hass.localize( - "ui.panel.config.integrations.config_entry.via" - )} - ${this._computeDeviceName( - this.devices, - this.device.via_device_id - )} -
- ` - : ""} - ${this.device.sw_version - ? html` -
- ${this.hass.localize( - "ui.panel.config.integrations.config_entry.firmware", - "version", - this.device.sw_version - )} -
- ` - : ""} -
- `; - } - - protected firstUpdated(changedProps) { - super.firstUpdated(changedProps); - loadDeviceRegistryDetailDialog(); - } - - private _computeArea(areas, device) { - if (!areas || !device || !device.area_id) { - return "No Area"; - } - // +1 because of "No Area" entry - return areas.find((area) => area.area_id === device.area_id).name; - } - - private _computeDeviceName(devices, deviceId) { - const device = devices.find((dev) => dev.id === deviceId); - return device - ? computeDeviceName(device, this.hass) - : `(${this.hass.localize( - "ui.panel.config.integrations.config_entry.device_unavailable" - )})`; - } - - static get styles(): CSSResult { - return css` - ha-card { - flex: 1 0 100%; - padding-bottom: 10px; - min-width: 0; - } - .device { - width: 30%; - } - .area { - color: var(--primary-text-color); - } - .extra-info { - margin-top: 8px; - } - .manuf, - .entity-id, - .model { - color: var(--secondary-text-color); - } - `; - } -} diff --git a/src/panels/config/devices/device-detail/ha-device-entities-card.ts b/src/panels/config/devices/device-detail/ha-device-entities-card.ts index 327e3b5ffe..dcf006bf08 100644 --- a/src/panels/config/devices/device-detail/ha-device-entities-card.ts +++ b/src/panels/config/devices/device-detail/ha-device-entities-card.ts @@ -166,6 +166,9 @@ export class HaDeviceEntitiesCard extends LitElement { static get styles(): CSSResult { return css` + :host { + display: block; + } ha-icon { width: 40px; } @@ -182,6 +185,9 @@ export class HaDeviceEntitiesCard extends LitElement { #entities > * { margin: 8px 16px 8px 8px; } + #entities > paper-icon-item { + margin: 0; + } paper-icon-item { min-height: 40px; padding: 0 8px; diff --git a/src/panels/config/devices/device-detail/ha-device-info-card.ts b/src/panels/config/devices/device-detail/ha-device-info-card.ts new file mode 100644 index 0000000000..7ad3e79ea4 --- /dev/null +++ b/src/panels/config/devices/device-detail/ha-device-info-card.ts @@ -0,0 +1,118 @@ +import { + DeviceRegistryEntry, + computeDeviceName, +} from "../../../../data/device_registry"; +import { loadDeviceRegistryDetailDialog } from "../../../../dialogs/device-registry-detail/show-dialog-device-registry-detail"; +import { + LitElement, + html, + customElement, + property, + TemplateResult, + CSSResult, + css, +} from "lit-element"; +import { HomeAssistant } from "../../../../types"; +import { AreaRegistryEntry } from "../../../../data/area_registry"; + +@customElement("ha-device-info-card") +export class HaDeviceCard extends LitElement { + @property() public hass!: HomeAssistant; + @property() public device!: DeviceRegistryEntry; + @property() public devices!: DeviceRegistryEntry[]; + @property() public areas!: AreaRegistryEntry[]; + @property() public narrow!: boolean; + + protected render(): TemplateResult { + return html` + +
+ ${this.device.model + ? html` +
${this.device.model}
+ ` + : ""} + ${this.device.manufacturer + ? html` +
+ ${this.hass.localize( + "ui.panel.config.integrations.config_entry.manuf", + "manufacturer", + this.device.manufacturer + )} +
+ ` + : ""} + ${this.device.via_device_id + ? html` +
+ ${this.hass.localize( + "ui.panel.config.integrations.config_entry.via" + )} + ${this._computeDeviceName( + this.devices, + this.device.via_device_id + )} +
+ ` + : ""} + ${this.device.sw_version + ? html` +
+ ${this.hass.localize( + "ui.panel.config.integrations.config_entry.firmware", + "version", + this.device.sw_version + )} +
+ ` + : ""} + +
+
+ `; + } + + protected firstUpdated(changedProps) { + super.firstUpdated(changedProps); + loadDeviceRegistryDetailDialog(); + } + + private _computeDeviceName(devices, deviceId) { + const device = devices.find((dev) => dev.id === deviceId); + return device + ? computeDeviceName(device, this.hass) + : `(${this.hass.localize( + "ui.panel.config.integrations.config_entry.device_unavailable" + )})`; + } + + static get styles(): CSSResult { + return css` + :host { + display: block; + } + ha-card { + flex: 1 0 100%; + padding-bottom: 10px; + min-width: 0; + } + .device { + width: 30%; + } + .area { + color: var(--primary-text-color); + } + .extra-info { + margin-top: 8px; + } + .manuf, + .entity-id, + .model { + color: var(--secondary-text-color); + } + `; + } +} diff --git a/src/panels/config/devices/ha-config-device-page.ts b/src/panels/config/devices/ha-config-device-page.ts index af89408ad5..02ca4cd905 100644 --- a/src/panels/config/devices/ha-config-device-page.ts +++ b/src/panels/config/devices/ha-config-device-page.ts @@ -15,7 +15,7 @@ import "../../../layouts/hass-tabs-subpage"; import "../../../layouts/hass-error-screen"; import "../ha-config-section"; -import "./device-detail/ha-device-card"; +import "./device-detail/ha-device-info-card"; import "./device-detail/ha-device-card-mqtt"; import "./device-detail/ha-device-entities-card"; import { HomeAssistant, Route } from "../../../types"; @@ -23,6 +23,7 @@ import { ConfigEntry } from "../../../data/config_entries"; import { EntityRegistryEntry, updateEntityRegistryEntry, + findBatteryEntity, } from "../../../data/entity_registry"; import { DeviceRegistryEntry, @@ -41,9 +42,9 @@ import { createValidEntityId } from "../../../common/entity/valid_entity_id"; import { configSections } from "../ha-panel-config"; import { RelatedResult, findRelated } from "../../../data/search"; import { SceneEntities, showSceneEditor } from "../../../data/scene"; -import { navigate } from "../../../common/navigate"; import { showDeviceAutomationDialog } from "./device-detail/show-dialog-device-automation"; import { isComponentLoaded } from "../../../common/config/is_component_loaded"; +import { ifDefined } from "lit-html/directives/if-defined"; export interface EntityRegistryStateEntry extends EntityRegistryEntry { stateName?: string; @@ -96,6 +97,10 @@ export class HaConfigDevicePage extends LitElement { ) ); + private _batteryEntity = memoizeOne((entities: EntityRegistryEntry[]): + | EntityRegistryEntry + | undefined => findBatteryEntity(this.hass, entities)); + protected firstUpdated(changedProps) { super.firstUpdated(changedProps); loadDeviceRegistryDetailDialog(); @@ -123,6 +128,11 @@ export class HaConfigDevicePage extends LitElement { const integrations = this._integrations(device, this.entries); const entities = this._entities(this.deviceId, this.entities); + const batteryEntity = this._batteryEntity(entities); + const batteryState = batteryEntity + ? this.hass.states[batteryEntity.entity_id] + : undefined; + const areaName = this._computeAreaName(this.areas, device); return html`
-
-
- ${ - this.narrow - ? "" - : html` +
+ ${ + this.narrow + ? "" + : html` +

${computeDeviceName(device, this.hass)}

- ` - } - + ` + } +
+ ${ + batteryState + ? html` +
+ ${batteryState.state}% + +
+ ` + : "" + } + +
+
+
+ + > ${ integrations.includes("mqtt") ? html` @@ -173,7 +220,7 @@ export class HaConfigDevicePage extends LitElement { ` : html`` } -
+ ${ entities.length @@ -187,32 +234,46 @@ export class HaConfigDevicePage extends LitElement { : html`` }
-
${ isComponentLoaded(this.hass, "automation") ? html` - ${this._related?.automation?.length + +
+ ${this.hass.localize( + "ui.panel.config.devices.automation.automations" + )} + +
+ ${this._related?.automation?.length ? this._related.automation.map((automation) => { const state = this.hass.states[automation]; return state ? html`
- - - ${state.attributes.friendly_name || - automation} - - - + + + ${computeStateName(state)} + + + + ${!state.attributes.id ? html` `} -
- - ${this.hass.localize( - "ui.panel.config.devices.automation.create" - )} - -
` : "" @@ -249,58 +303,72 @@ export class HaConfigDevicePage extends LitElement { ${ isComponentLoaded(this.hass, "scene") ? html` - ${this._related?.scene?.length - ? this._related.scene.map((scene) => { - const state = this.hass.states[scene]; - return state + +
+ ${this.hass.localize( + "ui.panel.config.devices.scene.scenes" + )} + ${ + entities.length ? html` -
- - - ${state.attributes.friendly_name || - scene} - - - - ${!state.attributes.id - ? html` - ${this.hass.localize( - "ui.panel.config.devices.cant_edit" - )} - - ` - : ""} -
+ ` - : ""; - }) - : html` - ${this.hass.localize( - "ui.panel.config.devices.scene.no_scenes" - )} - `} - ${entities.length - ? html` -
- - ${this.hass.localize( - "ui.panel.config.devices.scene.create" - )} - -
- ` - : ""} + : "" + } +
+ + ${ + this._related?.scene?.length + ? this._related.scene.map((scene) => { + const state = this.hass.states[scene]; + return state + ? html` +
+ + + + ${computeStateName(state)} + + + + + ${!state.attributes.id + ? html` + ${this.hass.localize( + "ui.panel.config.devices.cant_edit" + )} + + ` + : ""} +
+ ` + : ""; + }) + : html` + ${this.hass.localize( + "ui.panel.config.devices.scene.no_scenes" + )} + ` + } +
` : "" @@ -308,25 +376,38 @@ export class HaConfigDevicePage extends LitElement { ${ isComponentLoaded(this.hass, "script") ? html` - ${this._related?.script?.length + +
+ ${this.hass.localize( + "ui.panel.config.devices.script.scripts" + )} + +
+ ${this._related?.script?.length ? this._related.script.map((script) => { const state = this.hass.states[script]; return state ? html` - - - ${state.attributes.friendly_name || - script} - - - + + + ${computeStateName(state)} + + + + ` : ""; }) @@ -337,19 +418,11 @@ export class HaConfigDevicePage extends LitElement { )} `} -
- - ${this.hass.localize( - "ui.panel.config.devices.script.create" - )} - -
` : "" }
-
`; @@ -363,6 +436,21 @@ export class HaConfigDevicePage extends LitElement { return state ? computeStateName(state) : null; } + private _computeAreaName(areas, device): string | undefined { + if (!areas || !device || !device.area_id) { + return undefined; + } + return areas.find((area) => area.area_id === device.area_id).name; + } + + private _onImageLoad(ev) { + ev.target.style.display = "inline-block"; + } + + private _onImageError(ev) { + ev.target.style.display = "none"; + } + private async _findRelated() { this._related = await findRelated(this.hass, "device", this.deviceId); } @@ -377,25 +465,6 @@ export class HaConfigDevicePage extends LitElement { }); } - private _openScene(ev: Event) { - const state = (ev.currentTarget as any).scene; - if (state.attributes.id) { - navigate(this, `/config/scene/edit/${state.attributes.id}`); - } - } - - private _openScript(ev: Event) { - const script = (ev.currentTarget as any).script; - navigate(this, `/config/script/edit/${script}`); - } - - private _openAutomation(ev: Event) { - const state = (ev.currentTarget as any).automation; - if (state.attributes.id) { - navigate(this, `/config/automation/edit/${state.attributes.id}`); - } - } - private _showScriptDialog() { showDeviceAutomationDialog(this, { deviceId: this.deviceId, script: true }); } @@ -478,6 +547,18 @@ export class HaConfigDevicePage extends LitElement { margin-bottom: 32px; } + .card-header { + display: flex; + align-items: center; + justify-content: space-between; + } + + .card-header paper-icon-button { + margin-right: -8px; + color: var(--primary-color); + height: auto; + } + .device-info { padding: 16px; } @@ -486,7 +567,7 @@ export class HaConfigDevicePage extends LitElement { } h1 { - margin-top: 0; + margin: 0; font-family: var(--paper-font-headline_-_font-family); -webkit-font-smoothing: var( --paper-font-headline_-_-webkit-font-smoothing @@ -498,46 +579,60 @@ export class HaConfigDevicePage extends LitElement { opacity: var(--dark-primary-opacity); } - .left, + .header { + display: flex; + justify-content: space-between; + } + .column, .fullwidth { padding: 8px; box-sizing: border-box; } - - .left { - width: 33.33%; - padding-bottom: 0; + .column { + width: 33%; + flex-grow: 1; } - - .right { - width: 66.66%; - display: flex; - flex-wrap: wrap; - } - .fullwidth { width: 100%; + flex-grow: 1; } - .column { - width: 50%; + .header-right { + align-self: center; + } + + .header-right img { + height: 30px; + } + + .header-right { + display: flex; + } + + .header-right:first-child { + width: 100%; + justify-content: flex-end; + } + + .header-right > *:not(:first-child) { + margin-left: 16px; + } + + .battery { + align-self: center; + align-items: center; + display: flex; } .column > *:not(:first-child) { margin-top: 16px; } - :host([narrow]) .left, - :host([narrow]) .right, :host([narrow]) .column { width: 100%; } - :host([narrow]) .container > *:first-child { - padding-top: 0; - } - :host([narrow]) .container { margin-top: 0; } @@ -549,6 +644,11 @@ export class HaConfigDevicePage extends LitElement { paper-item.no-link { cursor: default; } + + a { + text-decoration: none; + color: var(--primary-text-color); + } `; } } diff --git a/src/panels/config/devices/ha-config-devices-dashboard.ts b/src/panels/config/devices/ha-config-devices-dashboard.ts index a0c05669d4..28bc4922e0 100644 --- a/src/panels/config/devices/ha-config-devices-dashboard.ts +++ b/src/panels/config/devices/ha-config-devices-dashboard.ts @@ -13,7 +13,10 @@ import { computeDeviceName, DeviceEntityLookup, } from "../../../data/device_registry"; -import { EntityRegistryEntry } from "../../../data/entity_registry"; +import { + EntityRegistryEntry, + findBatteryEntity, +} from "../../../data/entity_registry"; import { ConfigEntry } from "../../../data/config_entries"; import { AreaRegistryEntry } from "../../../data/area_registry"; import { configSections } from "../ha-panel-config"; @@ -130,25 +133,38 @@ export class HaConfigDeviceDashboard extends LitElement { direction: "asc", grows: true, template: (name, device: DataTableRowData) => { - const battery = device.battery_entity - ? this.hass.states[device.battery_entity] - : undefined; - // Have to work on a nice layout for mobile return html` - ${name}
- ${device.area} | ${device.integration}
- ${battery && !isNaN(battery.state as any) - ? html` - ${battery.state}% - - ` - : ""} + ${name} +
+ ${device.area} | ${device.integration} +
`; }, }, + battery_entity: { + title: this.hass.localize( + "ui.panel.config.devices.data_table.battery" + ), + sortable: true, + type: "numeric", + width: "90px", + template: (batteryEntity: string) => { + const battery = batteryEntity + ? this.hass.states[batteryEntity] + : undefined; + return battery + ? html` + ${isNaN(battery.state as any) ? "-" : battery.state}% + + ` + : html` + - + `; + }, + }, } : { name: { @@ -198,7 +214,8 @@ export class HaConfigDeviceDashboard extends LitElement { ), sortable: true, type: "numeric", - width: "60px", + width: "15%", + maxWidth: "90px", template: (batteryEntity: string) => { const battery = batteryEntity ? this.hass.states[batteryEntity] @@ -246,12 +263,10 @@ export class HaConfigDeviceDashboard extends LitElement { deviceId: string, deviceEntityLookup: DeviceEntityLookup ): string | undefined { - const batteryEntity = (deviceEntityLookup[deviceId] || []).find( - (entity) => - this.hass.states[entity.entity_id] && - this.hass.states[entity.entity_id].attributes.device_class === "battery" + const batteryEntity = findBatteryEntity( + this.hass, + deviceEntityLookup[deviceId] || [] ); - return batteryEntity ? batteryEntity.entity_id : undefined; } diff --git a/src/panels/config/devices/ha-devices-data-table.ts b/src/panels/config/devices/ha-devices-data-table.ts index b9ee20a35c..9a0bbdfc5c 100644 --- a/src/panels/config/devices/ha-devices-data-table.ts +++ b/src/panels/config/devices/ha-devices-data-table.ts @@ -23,7 +23,10 @@ import { computeDeviceName, DeviceEntityLookup, } from "../../../data/device_registry"; -import { EntityRegistryEntry } from "../../../data/entity_registry"; +import { + EntityRegistryEntry, + findBatteryEntity, +} from "../../../data/entity_registry"; import { ConfigEntry } from "../../../data/config_entries"; import { AreaRegistryEntry } from "../../../data/area_registry"; import { navigate } from "../../../common/navigate"; @@ -204,7 +207,8 @@ export class HaDevicesDataTable extends LitElement { ), sortable: true, type: "numeric", - width: "60px", + width: "15%", + maxWidth: "90px", template: (batteryEntity: string) => { const battery = batteryEntity ? this.hass.states[batteryEntity] @@ -250,12 +254,10 @@ export class HaDevicesDataTable extends LitElement { deviceId: string, deviceEntityLookup: DeviceEntityLookup ): string | undefined { - const batteryEntity = (deviceEntityLookup[deviceId] || []).find( - (entity) => - this.hass.states[entity.entity_id] && - this.hass.states[entity.entity_id].attributes.device_class === "battery" + const batteryEntity = findBatteryEntity( + this.hass, + deviceEntityLookup[deviceId] || [] ); - return batteryEntity ? batteryEntity.entity_id : undefined; } From 5a2e08647f8f3a2546137308621d05e30cc7e68e Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Mon, 30 Mar 2020 14:21:36 +0200 Subject: [PATCH 57/66] Add area config page (#5343) * Add area config page * Comments * Update ha-config-area-page.ts * Update ha-config-area-page.ts --- src/data/device_registry.ts | 3 + src/dialogs/generic/show-dialog-box.ts | 3 +- src/layouts/hass-tabs-subpage-data-table.ts | 1 + .../areas/dialog-area-registry-detail.ts | 6 +- .../config/areas/ha-config-area-page.ts | 397 ++++++++++++++++++ .../config/areas/ha-config-areas-dashboard.ts | 217 ++++++++++ src/panels/config/areas/ha-config-areas.ts | 298 +++++-------- .../areas/show-dialog-area-registry-detail.ts | 6 +- src/translations/en.json | 5 + 9 files changed, 727 insertions(+), 209 deletions(-) create mode 100644 src/panels/config/areas/ha-config-area-page.ts create mode 100644 src/panels/config/areas/ha-config-areas-dashboard.ts diff --git a/src/data/device_registry.ts b/src/data/device_registry.ts index fabfe7da26..119231feec 100644 --- a/src/data/device_registry.ts +++ b/src/data/device_registry.ts @@ -53,6 +53,9 @@ export const fallbackDeviceName = ( return undefined; }; +export const devicesInArea = (devices: DeviceRegistryEntry[], areaId: string) => + devices.filter((device) => device.area_id === areaId); + export const updateDeviceRegistryEntry = ( hass: HomeAssistant, deviceId: string, diff --git a/src/dialogs/generic/show-dialog-box.ts b/src/dialogs/generic/show-dialog-box.ts index 4d9975a6df..8b05578bd7 100644 --- a/src/dialogs/generic/show-dialog-box.ts +++ b/src/dialogs/generic/show-dialog-box.ts @@ -1,8 +1,9 @@ import { fireEvent } from "../../common/dom/fire_event"; +import { TemplateResult } from "lit-html"; interface BaseDialogParams { confirmText?: string; - text?: string; + text?: string | TemplateResult; title?: string; } diff --git a/src/layouts/hass-tabs-subpage-data-table.ts b/src/layouts/hass-tabs-subpage-data-table.ts index d12ed9e8f8..4c458569cf 100644 --- a/src/layouts/hass-tabs-subpage-data-table.ts +++ b/src/layouts/hass-tabs-subpage-data-table.ts @@ -88,6 +88,7 @@ export class HaTabsSubpageDataTable extends LitElement { .route=${this.route} .tabs=${this.tabs} > +
${this.narrow ? html`
diff --git a/src/panels/config/areas/dialog-area-registry-detail.ts b/src/panels/config/areas/dialog-area-registry-detail.ts index af7410c8c5..3bfa1a0a99 100644 --- a/src/panels/config/areas/dialog-area-registry-detail.ts +++ b/src/panels/config/areas/dialog-area-registry-detail.ts @@ -109,9 +109,9 @@ class DialogAreaDetail extends LitElement { name: this._name.trim(), }; if (this._params!.entry) { - await this._params!.updateEntry(values); + await this._params!.updateEntry!(values); } else { - await this._params!.createEntry(values); + await this._params!.createEntry!(values); } this._params = undefined; } catch (err) { @@ -124,7 +124,7 @@ class DialogAreaDetail extends LitElement { private async _deleteEntry() { this._submitting = true; try { - if (await this._params!.removeEntry()) { + if (await this._params!.removeEntry!()) { this._params = undefined; } } finally { diff --git a/src/panels/config/areas/ha-config-area-page.ts b/src/panels/config/areas/ha-config-area-page.ts new file mode 100644 index 0000000000..9a2762d3dd --- /dev/null +++ b/src/panels/config/areas/ha-config-area-page.ts @@ -0,0 +1,397 @@ +import "@material/mwc-button"; +import "@polymer/paper-dialog-scrollable/paper-dialog-scrollable"; +import "@polymer/paper-input/paper-input"; +import { + css, + CSSResult, + customElement, + html, + LitElement, + property, + TemplateResult, +} from "lit-element"; +import "../../../components/dialog/ha-paper-dialog"; +import { haStyle } from "../../../resources/styles"; +import { HomeAssistant, Route } from "../../../types"; +import memoizeOne from "memoize-one"; +import { + AreaRegistryEntry, + updateAreaRegistryEntry, + deleteAreaRegistryEntry, +} from "../../../data/area_registry"; +import { + DeviceRegistryEntry, + devicesInArea, + computeDeviceName, +} from "../../../data/device_registry"; +import { configSections } from "../ha-panel-config"; +import { + showAreaRegistryDetailDialog, + loadAreaRegistryDetailDialog, +} from "./show-dialog-area-registry-detail"; +import { showConfirmationDialog } from "../../../dialogs/generic/show-dialog-box"; +import { RelatedResult, findRelated } from "../../../data/search"; +import { isComponentLoaded } from "../../../common/config/is_component_loaded"; +import { computeStateName } from "../../../common/entity/compute_state_name"; +import { ifDefined } from "lit-html/directives/if-defined"; + +@customElement("ha-config-area-page") +class HaConfigAreaPage extends LitElement { + @property() public hass!: HomeAssistant; + @property() public areaId!: string; + @property() public areas!: AreaRegistryEntry[]; + @property() public devices!: DeviceRegistryEntry[]; + @property({ type: Boolean, reflect: true }) public narrow!: boolean; + @property() public isWide!: boolean; + @property() public showAdvanced!: boolean; + @property() public route!: Route; + @property() private _related?: RelatedResult; + + private _area = memoizeOne((areaId: string, areas: AreaRegistryEntry[]): + | AreaRegistryEntry + | undefined => areas.find((area) => area.area_id === areaId)); + + private _devices = memoizeOne( + (areaId: string, devices: DeviceRegistryEntry[]): DeviceRegistryEntry[] => + devicesInArea(devices, areaId) + ); + + protected firstUpdated(changedProps) { + super.firstUpdated(changedProps); + loadAreaRegistryDetailDialog(); + } + + protected updated(changedProps) { + super.updated(changedProps); + if (changedProps.has("areaId")) { + this._findRelated(); + } + } + + protected render(): TemplateResult { + const area = this._area(this.areaId, this.areas); + + if (!area) { + return html` + + `; + } + + const devices = this._devices(this.areaId, this.devices); + + return html` + + ${this.narrow + ? html` + + ${area.name} + + ` + : ""} + + + +
+ ${!this.narrow + ? html` +
+

${area.name}

+
+ ` + : ""} +
+ ${devices.length + ? devices.map( + (device) => + html` + + + + ${computeDeviceName(device, this.hass)} + + + + + ` + ) + : html` + ${this.hass.localize( + "ui.panel.config.devices.no_devices" + )} + `} + +
+
+ ${isComponentLoaded(this.hass, "automation") + ? html` + ${this._related?.automation?.length + ? this._related.automation.map((automation) => { + const state = this.hass.states[automation]; + return state + ? html` +
+ + + + ${computeStateName(state)} + + + + + ${!state.attributes.id + ? html` + ${this.hass.localize( + "ui.panel.config.devices.cant_edit" + )} + + ` + : ""} +
+ ` + : ""; + }) + : html` + ${this.hass.localize( + "ui.panel.config.devices.automation.no_automations" + )} + `} +
+ ` + : ""} +
+
+ ${isComponentLoaded(this.hass, "scene") + ? html` + ${this._related?.scene?.length + ? this._related.scene.map((scene) => { + const state = this.hass.states[scene]; + return state + ? html` +
+ + + + ${computeStateName(state)} + + + + + ${!state.attributes.id + ? html` + ${this.hass.localize( + "ui.panel.config.devices.cant_edit" + )} + + ` + : ""} +
+ ` + : ""; + }) + : html` + ${this.hass.localize( + "ui.panel.config.devices.scene.no_scenes" + )} + `} +
+ ` + : ""} + ${isComponentLoaded(this.hass, "script") + ? html` + ${this._related?.script?.length + ? this._related.script.map((script) => { + const state = this.hass.states[script]; + return state + ? html` + + + + ${computeStateName(state)} + + + + + ` + : ""; + }) + : html` + + ${this.hass.localize( + "ui.panel.config.devices.script.no_scripts" + )} + `} + + ` + : ""} +
+
+
+ `; + } + + private async _findRelated() { + this._related = await findRelated(this.hass, "area", this.areaId); + } + + private _showSettings(ev: MouseEvent) { + const entry: AreaRegistryEntry = (ev.currentTarget! as any).entry; + this._openDialog(entry); + } + + private _openDialog(entry?: AreaRegistryEntry) { + showAreaRegistryDetailDialog(this, { + entry, + updateEntry: async (values) => + updateAreaRegistryEntry(this.hass!, entry!.area_id, values), + removeEntry: async () => { + if ( + !(await showConfirmationDialog(this, { + title: this.hass.localize( + "ui.panel.config.areas.delete.confirmation_title" + ), + text: this.hass.localize( + "ui.panel.config.areas.delete.confirmation_text" + ), + dismissText: this.hass.localize("ui.common.no"), + confirmText: this.hass.localize("ui.common.yes"), + })) + ) { + return false; + } + + try { + await deleteAreaRegistryEntry(this.hass!, entry!.area_id); + return true; + } catch (err) { + return false; + } + }, + }); + } + + static get styles(): CSSResult[] { + return [ + haStyle, + css` + h1 { + margin-top: 0; + font-family: var(--paper-font-headline_-_font-family); + -webkit-font-smoothing: var( + --paper-font-headline_-_-webkit-font-smoothing + ); + font-size: var(--paper-font-headline_-_font-size); + font-weight: var(--paper-font-headline_-_font-weight); + letter-spacing: var(--paper-font-headline_-_letter-spacing); + line-height: var(--paper-font-headline_-_line-height); + opacity: var(--dark-primary-opacity); + } + + .container { + display: flex; + flex-wrap: wrap; + margin: auto; + max-width: 1000px; + margin-top: 32px; + margin-bottom: 32px; + } + .column { + padding: 8px; + box-sizing: border-box; + width: 33%; + flex-grow: 1; + } + .fullwidth { + padding: 8px; + width: 100%; + } + .column > *:not(:first-child) { + margin-top: 16px; + } + + :host([narrow]) .column { + width: 100%; + } + + :host([narrow]) .container { + margin-top: 0; + } + + paper-item { + cursor: pointer; + } + + a { + text-decoration: none; + color: var(--primary-text-color); + } + + paper-item.no-link { + cursor: default; + } + `, + ]; + } +} + +declare global { + interface HTMLElementTagNameMap { + "ha-config-area-page": HaConfigAreaPage; + } +} diff --git a/src/panels/config/areas/ha-config-areas-dashboard.ts b/src/panels/config/areas/ha-config-areas-dashboard.ts new file mode 100644 index 0000000000..25abaa7a17 --- /dev/null +++ b/src/panels/config/areas/ha-config-areas-dashboard.ts @@ -0,0 +1,217 @@ +import { + LitElement, + TemplateResult, + html, + css, + CSSResult, + property, + customElement, +} from "lit-element"; +import "@polymer/paper-item/paper-item"; +import "@polymer/paper-item/paper-item-body"; + +import { HomeAssistant, Route } from "../../../types"; +import { + AreaRegistryEntry, + createAreaRegistryEntry, +} from "../../../data/area_registry"; +import "../../../components/ha-fab"; +import "../../../layouts/hass-loading-screen"; +import "../../../layouts/hass-tabs-subpage-data-table"; +import "../ha-config-section"; +import { + showAreaRegistryDetailDialog, + loadAreaRegistryDetailDialog, +} from "./show-dialog-area-registry-detail"; +import { configSections } from "../ha-panel-config"; +import memoizeOne from "memoize-one"; +import { + DataTableColumnContainer, + RowClickedEvent, +} from "../../../components/data-table/ha-data-table"; +import { + devicesInArea, + DeviceRegistryEntry, +} from "../../../data/device_registry"; +import { navigate } from "../../../common/navigate"; +import { HASSDomEvent } from "../../../common/dom/fire_event"; +import { showAlertDialog } from "../../../dialogs/generic/show-dialog-box"; + +@customElement("ha-config-areas-dashboard") +export class HaConfigAreasDashboard extends LitElement { + @property() public hass!: HomeAssistant; + @property() public isWide?: boolean; + @property() public narrow!: boolean; + @property() public route!: Route; + @property() public areas!: AreaRegistryEntry[]; + @property() public devices!: DeviceRegistryEntry[]; + + private _areas = memoizeOne( + (areas: AreaRegistryEntry[], devices: DeviceRegistryEntry[]) => { + return areas.map((area) => { + return { + ...area, + devices: devicesInArea(devices, area.area_id).length, + }; + }); + } + ); + + private _columns = memoizeOne( + (narrow: boolean): DataTableColumnContainer => + narrow + ? { + name: { + title: this.hass.localize( + "ui.panel.config.areas.data_table.area" + ), + sortable: true, + filterable: true, + grows: true, + direction: "asc", + }, + } + : { + name: { + title: this.hass.localize( + "ui.panel.config.areas.data_table.area" + ), + sortable: true, + filterable: true, + grows: true, + direction: "asc", + }, + devices: { + title: this.hass.localize( + "ui.panel.config.areas.data_table.devices" + ), + sortable: true, + type: "numeric", + width: "20%", + direction: "asc", + }, + } + ); + + protected render(): TemplateResult { + return html` + + + + + `; + } + + protected firstUpdated(changedProps) { + super.firstUpdated(changedProps); + loadAreaRegistryDetailDialog(); + } + + private _createArea() { + this._openDialog(); + } + + private _showHelp() { + showAlertDialog(this, { + title: this.hass.localize("ui.panel.config.areas.caption"), + text: html` + ${this.hass.localize("ui.panel.config.areas.picker.introduction")} +

+ ${this.hass.localize("ui.panel.config.areas.picker.introduction2")} +

+ + ${this.hass.localize( + "ui.panel.config.areas.picker.integrations_page" + )} + + `, + }); + } + + private _handleRowClicked(ev: HASSDomEvent) { + const areaId = ev.detail.id; + navigate(this, `/config/areas/area/${areaId}`); + } + + private _openDialog(entry?: AreaRegistryEntry) { + showAreaRegistryDetailDialog(this, { + entry, + createEntry: async (values) => + createAreaRegistryEntry(this.hass!, values), + }); + } + + static get styles(): CSSResult { + return css` + hass-loading-screen { + --app-header-background-color: var(--sidebar-background-color); + --app-header-text-color: var(--sidebar-text-color); + } + a { + color: var(--primary-color); + } + ha-card { + max-width: 600px; + margin: 16px auto; + overflow: hidden; + } + .empty { + text-align: center; + } + paper-item { + cursor: pointer; + padding-top: 4px; + padding-bottom: 4px; + } + ha-fab { + position: fixed; + bottom: 16px; + right: 16px; + z-index: 1; + } + + ha-fab[is-wide] { + bottom: 24px; + right: 24px; + } + ha-fab[narrow] { + bottom: 84px; + } + ha-fab.rtl { + right: auto; + left: 16px; + } + + ha-fab[is-wide].rtl { + bottom: 24px; + right: auto; + left: 24px; + } + `; + } +} diff --git a/src/panels/config/areas/ha-config-areas.ts b/src/panels/config/areas/ha-config-areas.ts index 7c5212bb5d..ac7c351eef 100644 --- a/src/panels/config/areas/ha-config-areas.ts +++ b/src/panels/config/areas/ha-config-areas.ts @@ -1,226 +1,120 @@ +import "./ha-config-areas-dashboard"; +import "./ha-config-area-page"; +import { compare } from "../../../common/string/compare"; import { - LitElement, - TemplateResult, - html, - css, - CSSResult, - property, - customElement, -} from "lit-element"; -import "@polymer/paper-item/paper-item"; -import "@polymer/paper-item/paper-item-body"; - -import { HomeAssistant, Route } from "../../../types"; -import { - AreaRegistryEntry, - updateAreaRegistryEntry, - deleteAreaRegistryEntry, - createAreaRegistryEntry, subscribeAreaRegistry, + AreaRegistryEntry, } from "../../../data/area_registry"; -import "../../../components/ha-card"; -import "../../../components/ha-fab"; -import "../../../layouts/hass-tabs-subpage"; -import "../../../layouts/hass-loading-screen"; -import "../ha-config-section"; import { - showAreaRegistryDetailDialog, - loadAreaRegistryDetailDialog, -} from "./show-dialog-area-registry-detail"; -import { classMap } from "lit-html/directives/class-map"; -import { computeRTL } from "../../../common/util/compute_rtl"; + HassRouterPage, + RouterOptions, +} from "../../../layouts/hass-router-page"; +import { property, customElement, PropertyValues } from "lit-element"; +import { HomeAssistant } from "../../../types"; +import { ConfigEntry, getConfigEntries } from "../../../data/config_entries"; +import { + DeviceRegistryEntry, + subscribeDeviceRegistry, +} from "../../../data/device_registry"; import { UnsubscribeFunc } from "home-assistant-js-websocket"; -import { configSections } from "../ha-panel-config"; -import { showConfirmationDialog } from "../../../dialogs/generic/show-dialog-box"; @customElement("ha-config-areas") -export class HaConfigAreas extends LitElement { +class HaConfigAreas extends HassRouterPage { @property() public hass!: HomeAssistant; - @property() public isWide?: boolean; @property() public narrow!: boolean; - @property() public route!: Route; - @property() private _areas?: AreaRegistryEntry[]; - private _unsubAreas?: UnsubscribeFunc; + @property() public isWide!: boolean; + @property() public showAdvanced!: boolean; + + protected routerOptions: RouterOptions = { + defaultPage: "dashboard", + routes: { + dashboard: { + tag: "ha-config-areas-dashboard", + cache: true, + }, + area: { + tag: "ha-config-area-page", + }, + }, + }; + + @property() private _configEntries: ConfigEntry[] = []; + @property() private _deviceRegistryEntries: DeviceRegistryEntry[] = []; + @property() private _areas: AreaRegistryEntry[] = []; + + private _unsubs?: UnsubscribeFunc[]; + + public connectedCallback() { + super.connectedCallback(); + + if (!this.hass) { + return; + } + this._loadData(); + } public disconnectedCallback() { super.disconnectedCallback(); - if (this._unsubAreas) { - this._unsubAreas(); + if (this._unsubs) { + while (this._unsubs.length) { + this._unsubs.pop()!(); + } + this._unsubs = undefined; } } - protected render(): TemplateResult { - if (!this.hass || this._areas === undefined) { - return html` - - `; - } - return html` - - - - ${this.hass.localize("ui.panel.config.areas.picker.header")} - - - ${this.hass.localize("ui.panel.config.areas.picker.introduction")} -

- ${this.hass.localize( - "ui.panel.config.areas.picker.introduction2" - )} -

- - ${this.hass.localize( - "ui.panel.config.areas.picker.integrations_page" - )} - -
- - ${this._areas.map((entry) => { - return html` - - - ${entry.name} - - - `; - })} - ${this._areas.length === 0 - ? html` -
- ${this.hass.localize("ui.panel.config.areas.no_areas")} - - ${this.hass.localize("ui.panel.config.areas.create_area")} - -
- ` - : html``} -
-
-
- - - `; - } - protected firstUpdated(changedProps) { super.firstUpdated(changedProps); - loadAreaRegistryDetailDialog(); - } - - protected updated(changedProps) { - super.updated(changedProps); - if (!this._unsubAreas) { - this._unsubAreas = subscribeAreaRegistry( - this.hass.connection, - (areas) => { - this._areas = areas; - } - ); - } - } - - private _createArea() { - this._openDialog(); - } - - private _openEditEntry(ev: MouseEvent) { - const entry: AreaRegistryEntry = (ev.currentTarget! as any).entry; - this._openDialog(entry); - } - private _openDialog(entry?: AreaRegistryEntry) { - showAreaRegistryDetailDialog(this, { - entry, - createEntry: async (values) => - createAreaRegistryEntry(this.hass!, values), - updateEntry: async (values) => - updateAreaRegistryEntry(this.hass!, entry!.area_id, values), - removeEntry: async () => { - if ( - !(await showConfirmationDialog(this, { - title: this.hass.localize( - "ui.panel.config.areas.delete.confirmation_title" - ), - text: this.hass.localize( - "ui.panel.config.areas.delete.confirmation_text" - ), - dismissText: this.hass.localize("ui.common.no"), - confirmText: this.hass.localize("ui.common.yes"), - })) - ) { - return false; - } - - try { - await deleteAreaRegistryEntry(this.hass!, entry!.area_id); - return true; - } catch (err) { - return false; - } - }, + this.addEventListener("hass-reload-entries", () => { + this._loadData(); }); } - static get styles(): CSSResult { - return css` - hass-loading-screen { - --app-header-background-color: var(--sidebar-background-color); - --app-header-text-color: var(--sidebar-text-color); - } - a { - color: var(--primary-color); - } - ha-card { - max-width: 600px; - margin: 16px auto; - overflow: hidden; - } - .empty { - text-align: center; - } - paper-item { - cursor: pointer; - padding-top: 4px; - padding-bottom: 4px; - } - ha-fab { - position: fixed; - bottom: 16px; - right: 16px; - z-index: 1; - } + protected updated(changedProps: PropertyValues) { + super.updated(changedProps); + if (!this._unsubs && changedProps.has("hass")) { + this._loadData(); + } + } - ha-fab[is-wide] { - bottom: 24px; - right: 24px; - } - ha-fab[narrow] { - bottom: 84px; - } - ha-fab.rtl { - right: auto; - left: 16px; - } + protected updatePageEl(pageEl) { + pageEl.hass = this.hass; - ha-fab[is-wide].rtl { - bottom: 24px; - right: auto; - left: 24px; - } - `; + if (this._currentPage === "area") { + pageEl.areaId = this.routeTail.path.substr(1); + } + + pageEl.entries = this._configEntries; + pageEl.devices = this._deviceRegistryEntries; + pageEl.areas = this._areas; + pageEl.narrow = this.narrow; + pageEl.isWide = this.isWide; + pageEl.showAdvanced = this.showAdvanced; + pageEl.route = this.routeTail; + } + + private _loadData() { + getConfigEntries(this.hass).then((configEntries) => { + this._configEntries = configEntries.sort((conf1, conf2) => + compare(conf1.title, conf2.title) + ); + }); + if (this._unsubs) { + return; + } + this._unsubs = [ + subscribeAreaRegistry(this.hass.connection, (areas) => { + this._areas = areas; + }), + subscribeDeviceRegistry(this.hass.connection, (entries) => { + this._deviceRegistryEntries = entries; + }), + ]; + } +} + +declare global { + interface HTMLElementTagNameMap { + "ha-config-areas": HaConfigAreas; } } diff --git a/src/panels/config/areas/show-dialog-area-registry-detail.ts b/src/panels/config/areas/show-dialog-area-registry-detail.ts index 4a24231981..401c88f13b 100644 --- a/src/panels/config/areas/show-dialog-area-registry-detail.ts +++ b/src/panels/config/areas/show-dialog-area-registry-detail.ts @@ -6,11 +6,11 @@ import { export interface AreaRegistryDetailDialogParams { entry?: AreaRegistryEntry; - createEntry: (values: AreaRegistryEntryMutableParams) => Promise; - updateEntry: ( + createEntry?: (values: AreaRegistryEntryMutableParams) => Promise; + updateEntry?: ( updates: Partial ) => Promise; - removeEntry: () => Promise; + removeEntry?: () => Promise; } export const loadAreaRegistryDetailDialog = () => diff --git a/src/translations/en.json b/src/translations/en.json index 9307f0643d..0df149151d 100755 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -785,6 +785,10 @@ "areas": { "caption": "Areas", "description": "Overview of all areas in your home.", + "data_table": { + "area": "Area", + "devices": "Devices" + }, "picker": { "header": "Areas", "introduction": "Areas are used to organize where devices are. This information will be used throughout Home Assistant to help you in organizing your interface, permissions and integrations with other systems.", @@ -1442,6 +1446,7 @@ "unknown_error": "Unknown error", "name": "Name", "update": "Update", + "no_devices": "No devices", "automation": { "automations": "Automations", "no_automations": "No automations", From fca286d6c0e09905dedf6ad50abae46e37a4ae99 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Mon, 30 Mar 2020 14:21:55 +0200 Subject: [PATCH 58/66] Change automation picker to data table (#5344) * Change automation picker to data-table * Update ha-automation-picker.ts * Update ha-automation-picker.ts * Update ha-automation-picker.ts * Add edit button + disabled tooltip * Fix translation key * Remove unused * Comments and fixes * Update ha-automation-picker.ts --- src/components/data-table/ha-data-table.ts | 26 +- .../config/automation/ha-automation-picker.ts | 289 ++++++++---------- src/translations/en.json | 5 +- 3 files changed, 160 insertions(+), 160 deletions(-) diff --git a/src/components/data-table/ha-data-table.ts b/src/components/data-table/ha-data-table.ts index f68793bb04..19136ce94e 100644 --- a/src/components/data-table/ha-data-table.ts +++ b/src/components/data-table/ha-data-table.ts @@ -69,7 +69,7 @@ export interface DataTableSortColumnData { export interface DataTableColumnData extends DataTableSortColumnData { title: string; - type?: "numeric" | "icon"; + type?: "numeric" | "icon" | "icon-button"; template?: (data: any, row: T) => TemplateResult | string; width?: string; maxWidth?: string; @@ -228,10 +228,13 @@ export class HaDataTable extends LitElement { const sorted = key === this._sortColumn; const classes = { "mdc-data-table__header-cell--numeric": Boolean( - column.type && column.type === "numeric" + column.type === "numeric" ), "mdc-data-table__header-cell--icon": Boolean( - column.type && column.type === "icon" + column.type === "icon" + ), + "mdc-data-table__header-cell--icon-button": Boolean( + column.type === "icon-button" ), sortable: Boolean(column.sortable), "not-sorted": Boolean(column.sortable && !sorted), @@ -318,10 +321,13 @@ export class HaDataTable extends LitElement {
{ + return automations.map((automation) => { + return { + ...automation, + name: computeStateName(automation), + }; + }); + }); + + private _columns = memoizeOne( + (narrow: boolean, _language): DataTableColumnContainer => { + const columns: DataTableColumnContainer = { + toggle: { + title: "", + type: "icon", + template: (_toggle, automation) => + html` + + `, + }, + name: { + title: this.hass.localize( + "ui.panel.config.automation.picker.headers.name" + ), + sortable: true, + filterable: true, + direction: "asc", + grows: true, + template: (name, automation: any) => html` + ${name} +
+ ${this.hass.localize("ui.card.automation.last_triggered")}: + ${automation.attributes.last_triggered + ? formatDateTime( + new Date(automation.attributes.last_triggered), + this.hass.language + ) + : this.hass.localize("ui.components.relative_time.never")} +
+ `, + }, + }; + if (!narrow) { + columns.execute = { + title: "", + template: (_info, automation) => html` + + ${this.hass.localize("ui.card.automation.trigger")} + + `, + }; + } + columns.info = { + title: "", + type: "icon-button", + template: (_info, automation) => html` + + `, + }; + columns.edit = { + title: "", + type: "icon-button", + template: (_info, automation: any) => html` + + + + ${!automation.attributes.id + ? html` + + ${this.hass.localize( + "ui.panel.config.automation.picker.only_editable" + )} + + ` + : ""} + `, + }; + return columns; + } + ); + protected render(): TemplateResult { return html` - - -
- ${this.hass.localize("ui.panel.config.automation.picker.header")} -
-
- ${this.hass.localize( - "ui.panel.config.automation.picker.introduction" - )} -

- - ${this.hass.localize( - "ui.panel.config.automation.picker.learn_more" - )} - -

-
- - - ${this.automations.length === 0 - ? html` -
-

- ${this.hass.localize( - "ui.panel.config.automation.picker.no_automations" - )} -

-
- ` - : this.automations.map( - (automation) => html` - -
- - - -
${computeStateName(automation)}
-
- ${this.hass.localize( - "ui.card.automation.last_triggered" - )}: ${ - automation.attributes.last_triggered - ? formatDateTime( - new Date(automation.attributes.last_triggered), - this.hass.language - ) - : this.hass.localize("ui.components.relative_time.never") - } -
-
- -
- - ` - )} -
-
-
- -
-
+ + `; } private _showInfo(ev) { + ev.stopPropagation(); const entityId = ev.currentTarget.automation.entity_id; fireEvent(this, "hass-more-info", { entityId }); } + private _execute(ev) { + const entityId = ev.currentTarget.automation.entity_id; + triggerAutomation(this.hass, entityId); + } + private _createNew() { if (!isComponentLoaded(this.hass, "cloud")) { showAutomationEditor(this); @@ -190,33 +202,6 @@ class HaAutomationPicker extends LitElement { return [ haStyle, css` - :host { - display: block; - } - - ha-card { - margin-bottom: 56px; - } - - .automation { - display: flex; - flex-direction: horizontal; - align-items: center; - padding: 0 8px 0 16px; - } - - .automation a[href] { - color: var(--primary-text-color); - } - - ha-entity-toggle { - margin-right: 16px; - } - - .actions { - display: flex; - } - ha-fab { position: fixed; bottom: 16px; @@ -242,10 +227,6 @@ class HaAutomationPicker extends LitElement { right: auto; left: 24px; } - - a { - color: var(--primary-color); - } `, ]; } diff --git a/src/translations/en.json b/src/translations/en.json index 0df149151d..c74e17a60a 100755 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -1002,7 +1002,10 @@ "edit_automation": "Edit automation", "show_info_automation": "Show info about automation", "delete_automation": "Delete automation", - "delete_confirm": "Are you sure you want to delete this automation?" + "delete_confirm": "Are you sure you want to delete this automation?", + "headers": { + "name": "Name" + } }, "editor": { "enable_disable": "Enable/Disable automation", From 6e4c707f9ea22331391b4b681b53e3c52fdfa50d Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Mon, 30 Mar 2020 15:06:29 +0200 Subject: [PATCH 59/66] Migrate scene config to data table (#5351) * Migrate scene config to data table * Remove unused styles * Update ha-scene-dashboard.ts * Lint + help * Update ha-scene-dashboard.ts --- src/panels/config/scene/ha-scene-dashboard.ts | 287 +++++++++--------- src/translations/en.json | 5 +- 2 files changed, 153 insertions(+), 139 deletions(-) diff --git a/src/panels/config/scene/ha-scene-dashboard.ts b/src/panels/config/scene/ha-scene-dashboard.ts index b8f5d6b062..de6da85887 100644 --- a/src/panels/config/scene/ha-scene-dashboard.ts +++ b/src/panels/config/scene/ha-scene-dashboard.ts @@ -1,30 +1,28 @@ -import { - LitElement, - TemplateResult, - html, - CSSResultArray, - css, - property, - customElement, -} from "lit-element"; import "@polymer/paper-icon-button/paper-icon-button"; -import "@polymer/paper-item/paper-item-body"; import "@polymer/paper-tooltip/paper-tooltip"; -import "../../../layouts/hass-tabs-subpage"; - -import "../../../components/ha-card"; -import "../../../components/ha-fab"; - -import "../ha-config-section"; - +import { + css, + CSSResultArray, + customElement, + html, + LitElement, + property, + TemplateResult, +} from "lit-element"; +import { ifDefined } from "lit-html/directives/if-defined"; +import memoizeOne from "memoize-one"; +import { fireEvent } from "../../../common/dom/fire_event"; import { computeStateName } from "../../../common/entity/compute_state_name"; import { computeRTL } from "../../../common/util/compute_rtl"; +import { DataTableColumnContainer } from "../../../components/data-table/ha-data-table"; +import "../../../components/ha-fab"; +import { forwardHaptic } from "../../../data/haptics"; +import { activateScene, SceneEntity } from "../../../data/scene"; +import { showAlertDialog } from "../../../dialogs/generic/show-dialog-box"; +import "../../../layouts/hass-tabs-subpage-data-table"; import { haStyle } from "../../../resources/styles"; import { HomeAssistant, Route } from "../../../types"; -import { SceneEntity, activateScene } from "../../../data/scene"; import { showToast } from "../../../util/toast"; -import { ifDefined } from "lit-html/directives/if-defined"; -import { forwardHaptic } from "../../../data/haptics"; import { configSections } from "../ha-panel-config"; @customElement("ha-scene-dashboard") @@ -35,108 +33,131 @@ class HaSceneDashboard extends LitElement { @property() public route!: Route; @property() public scenes!: SceneEntity[]; + private _scenes = memoizeOne((scenes: SceneEntity[]) => { + return scenes.map((scene) => { + return { + ...scene, + name: computeStateName(scene), + }; + }); + }); + + private _columns = memoizeOne( + (_language): DataTableColumnContainer => { + return { + activate: { + title: "", + type: "icon-button", + template: (_toggle, scene) => + html` + this._activateScene(ev)} + > + `, + }, + name: { + title: this.hass.localize( + "ui.panel.config.scene.picker.headers.name" + ), + sortable: true, + filterable: true, + direction: "asc", + grows: true, + }, + info: { + title: "", + type: "icon-button", + template: (_info, scene) => html` + + `, + }, + edit: { + title: "", + type: "icon-button", + template: (_info, scene: any) => html` + + + + ${!scene.attributes.id + ? html` + + ${this.hass.localize( + "ui.panel.config.scene.picker.only_editable" + )} + + ` + : ""} + `, + }, + }; + } + ); + protected render(): TemplateResult { return html` - - -
- ${this.hass.localize("ui.panel.config.scene.picker.header")} -
-
- ${this.hass.localize("ui.panel.config.scene.picker.introduction")} -

- - ${this.hass.localize("ui.panel.config.scene.picker.learn_more")} - -

-
- - - ${this.scenes.length === 0 - ? html` -
-

- ${this.hass.localize( - "ui.panel.config.scene.picker.no_scenes" - )} -

-
- ` - : this.scenes.map( - (scene) => html` - - ` - )} -
-
- - - -
+ + + + + `; } + private _showInfo(ev) { + ev.stopPropagation(); + const entityId = ev.currentTarget.scene.entity_id; + fireEvent(this, "hass-more-info", { entityId }); + } + private async _activateScene(ev) { + ev.stopPropagation(); const scene = ev.target.scene as SceneEntity; await activateScene(this.hass, scene.entity_id); showToast(this, { @@ -149,38 +170,28 @@ class HaSceneDashboard extends LitElement { forwardHaptic("light"); } + private _showHelp() { + showAlertDialog(this, { + title: this.hass.localize("ui.panel.config.scene.picker.header"), + text: html` + ${this.hass.localize("ui.panel.config.scene.picker.introduction")} +

+ + ${this.hass.localize("ui.panel.config.scene.picker.learn_more")} + +

+ `, + }); + } + static get styles(): CSSResultArray { return [ haStyle, css` - :host { - display: block; - height: 100%; - } - - ha-card { - margin-bottom: 56px; - } - - .scene { - display: flex; - flex-direction: horizontal; - align-items: center; - padding: 0 8px 0 16px; - } - - .scene > *:first-child { - margin-right: 8px; - } - - .scene a[href] { - color: var(--primary-text-color); - } - - .actions { - display: flex; - } - ha-fab { position: fixed; bottom: 16px; diff --git a/src/translations/en.json b/src/translations/en.json index c74e17a60a..dbe8c7f8ca 100755 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -1260,7 +1260,10 @@ "edit_scene": "Edit scene", "show_info_scene": "Show info about scene", "delete_scene": "Delete scene", - "delete_confirm": "Are you sure you want to delete this scene?" + "delete_confirm": "Are you sure you want to delete this scene?", + "headers": { + "name": "Name" + } }, "editor": { "introduction": "Use scenes to bring your home alive.", From e645342131f4ae051f2cddba3b34875f14913f6c Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Mon, 30 Mar 2020 15:37:59 +0200 Subject: [PATCH 60/66] Allow to start with empty view on take control (#5357) * Allow to start with empty view on take control * Localize --- .../lovelace/editor/hui-dialog-save-config.ts | 24 ++++++++++++++++++- src/translations/en.json | 1 + 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/src/panels/lovelace/editor/hui-dialog-save-config.ts b/src/panels/lovelace/editor/hui-dialog-save-config.ts index b51641dc22..b092a0ee44 100644 --- a/src/panels/lovelace/editor/hui-dialog-save-config.ts +++ b/src/panels/lovelace/editor/hui-dialog-save-config.ts @@ -10,6 +10,7 @@ import { } from "lit-element"; import "@polymer/paper-spinner/paper-spinner"; import "../../../components/dialog/ha-paper-dialog"; +import "../../../components/ha-switch"; import "../../../components/ha-yaml-editor"; // tslint:disable-next-line:no-duplicate-imports import { HaPaperDialog } from "../../../components/dialog/ha-paper-dialog"; @@ -21,11 +22,14 @@ import { SaveDialogParams } from "./show-save-config-dialog"; import { PolymerChangedEvent } from "../../../polymer-types"; import { fireEvent } from "../../../common/dom/fire_event"; +const EMPTY_CONFIG = { views: [] }; + @customElement("hui-dialog-save-config") export class HuiSaveConfig extends LitElement { @property() public hass?: HomeAssistant; @property() private _params?: SaveDialogParams; + @property() private _emptyConfig = false; @property() private _saving: boolean; @query("ha-paper-dialog") private _dialog?: HaPaperDialog; @@ -37,6 +41,7 @@ export class HuiSaveConfig extends LitElement { public async showDialog(params: SaveDialogParams): Promise { this._params = params; + this._emptyConfig = false; await this.updateComplete; this._dialog!.open(); } @@ -58,6 +63,7 @@ export class HuiSaveConfig extends LitElement {

${this.hass!.localize("ui.panel.lovelace.editor.save_config.para")}

+ ${this._params.mode === "storage" ? html`

@@ -65,6 +71,13 @@ export class HuiSaveConfig extends LitElement { "ui.panel.lovelace.editor.save_config.para_sure" )}

+ ${this.hass!.localize( + "ui.panel.lovelace.editor.save_config.empty_config" + )} ` : html`

@@ -135,6 +148,10 @@ export class HuiSaveConfig extends LitElement { fireEvent(this._dialog! as HTMLElement, "iron-resize"); } + private _emptyConfigChanged(ev) { + this._emptyConfig = ev.target.checked; + } + private async _saveConfig(): Promise { if (!this.hass || !this._params) { return; @@ -142,7 +159,9 @@ export class HuiSaveConfig extends LitElement { this._saving = true; try { const lovelace = this._params!.lovelace; - await lovelace.saveConfig(lovelace.config); + await lovelace.saveConfig( + this._emptyConfig ? EMPTY_CONFIG : lovelace.config + ); lovelace.setEditMode(true); this._saving = false; this._closeDialog(); @@ -182,6 +201,9 @@ export class HuiSaveConfig extends LitElement { height: 14px; margin-right: 20px; } + ha-switch { + padding-bottom: 16px; + } `, ]; } diff --git a/src/translations/en.json b/src/translations/en.json index dbe8c7f8ca..961a86dc8b 100755 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -1982,6 +1982,7 @@ "yaml_mode": "You are using YAML mode, which means you cannot change your Lovelace config from the UI. If you want to change Lovelace from the UI, remove 'mode: yaml' from your Lovelace configuration in 'configuration.yaml.'", "yaml_control": "To take control in YAML mode, create a YAML file with the name you specified in your config for this dashboard, or the default 'ui-lovelace.yaml'.", "yaml_config": "To help you start here is the current config of this dashboard:", + "empty_config": "Start with an empty dashboard", "cancel": "Never mind", "close": "Close", "save": "Take control" From 263138a388eb4b5cd528637971d946f5f788f4a6 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Mon, 30 Mar 2020 15:38:15 +0200 Subject: [PATCH 61/66] MIgrate scripts to data table (#5352) * MIgrate scripts to data table * Update imports * Update * Lint --- src/components/data-table/ha-data-table.ts | 16 +- src/dialogs/generic/dialog-box.ts | 3 + .../config/areas/ha-config-areas-dashboard.ts | 17 -- .../config/devices/ha-config-device-page.ts | 1 + src/panels/config/script/ha-script-picker.ts | 273 ++++++++++-------- src/translations/en.json | 5 +- 6 files changed, 169 insertions(+), 146 deletions(-) diff --git a/src/components/data-table/ha-data-table.ts b/src/components/data-table/ha-data-table.ts index 19136ce94e..ad3f1d0a2c 100644 --- a/src/components/data-table/ha-data-table.ts +++ b/src/components/data-table/ha-data-table.ts @@ -622,8 +622,20 @@ export class HaDataTable extends LitElement { .mdc-data-table__header-cell--icon-button, .mdc-data-table__cell--icon-button { - width: 40px; - padding: 4px; + width: 56px; + padding: 8px; + } + + .mdc-data-table__header-cell--icon-button:first-child, + .mdc-data-table__cell--icon-button:first-child { + width: 64px; + padding-left: 16px; + } + + .mdc-data-table__header-cell--icon-button:last-child, + .mdc-data-table__cell--icon-button:last-child { + width: 64px; + padding-right: 16px; } .mdc-data-table__cell--icon-button a { diff --git a/src/dialogs/generic/dialog-box.ts b/src/dialogs/generic/dialog-box.ts index ff19b3d4bb..1301347f7e 100644 --- a/src/dialogs/generic/dialog-box.ts +++ b/src/dialogs/generic/dialog-box.ts @@ -142,6 +142,9 @@ class DialogBox extends LitElement { min-width: initial; } } + a { + color: var(--primary-color); + } p { margin: 0; padding-top: 6px; diff --git a/src/panels/config/areas/ha-config-areas-dashboard.ts b/src/panels/config/areas/ha-config-areas-dashboard.ts index 25abaa7a17..81256f562a 100644 --- a/src/panels/config/areas/ha-config-areas-dashboard.ts +++ b/src/panels/config/areas/ha-config-areas-dashboard.ts @@ -172,29 +172,12 @@ export class HaConfigAreasDashboard extends LitElement { --app-header-background-color: var(--sidebar-background-color); --app-header-text-color: var(--sidebar-text-color); } - a { - color: var(--primary-color); - } - ha-card { - max-width: 600px; - margin: 16px auto; - overflow: hidden; - } - .empty { - text-align: center; - } - paper-item { - cursor: pointer; - padding-top: 4px; - padding-bottom: 4px; - } ha-fab { position: fixed; bottom: 16px; right: 16px; z-index: 1; } - ha-fab[is-wide] { bottom: 24px; right: 24px; diff --git a/src/panels/config/devices/ha-config-device-page.ts b/src/panels/config/devices/ha-config-device-page.ts index 02ca4cd905..bee4982244 100644 --- a/src/panels/config/devices/ha-config-device-page.ts +++ b/src/panels/config/devices/ha-config-device-page.ts @@ -198,6 +198,7 @@ export class HaConfigDevicePage extends LitElement { integrations[0] }/logo@2x.png 2x " + referrerpolicy="no-referrer" @load=${this._onImageLoad} @error=${this._onImageError} /> diff --git a/src/panels/config/script/ha-script-picker.ts b/src/panels/config/script/ha-script-picker.ts index ae56c4e188..bc2cee95fe 100644 --- a/src/panels/config/script/ha-script-picker.ts +++ b/src/panels/config/script/ha-script-picker.ts @@ -1,31 +1,28 @@ -import { - LitElement, - html, - CSSResultArray, - css, - TemplateResult, - property, - customElement, -} from "lit-element"; import "@polymer/paper-icon-button/paper-icon-button"; -import "@polymer/paper-item/paper-item-body"; import { HassEntity } from "home-assistant-js-websocket"; - -import "../../../layouts/hass-tabs-subpage"; - -import { computeRTL } from "../../../common/util/compute_rtl"; - -import "../../../components/ha-card"; -import "../../../components/ha-fab"; - -import "../ha-config-section"; - +import { + css, + CSSResultArray, + customElement, + html, + LitElement, + property, + TemplateResult, +} from "lit-element"; +import memoizeOne from "memoize-one"; +import { formatDateTime } from "../../../common/datetime/format_date_time"; +import { fireEvent } from "../../../common/dom/fire_event"; import { computeStateName } from "../../../common/entity/compute_state_name"; +import { computeRTL } from "../../../common/util/compute_rtl"; +import { DataTableColumnContainer } from "../../../components/data-table/ha-data-table"; +import "../../../components/ha-fab"; +import { triggerScript } from "../../../data/script"; +import "../../../layouts/hass-tabs-subpage-data-table"; import { haStyle } from "../../../resources/styles"; import { HomeAssistant, Route } from "../../../types"; -import { triggerScript } from "../../../data/script"; import { showToast } from "../../../util/toast"; import { configSections } from "../ha-panel-config"; +import { showAlertDialog } from "../../../dialogs/generic/show-dialog-box"; @customElement("ha-script-picker") class HaScriptPicker extends LitElement { @@ -35,91 +32,123 @@ class HaScriptPicker extends LitElement { @property() public narrow!: boolean; @property() public route!: Route; + private _scripts = memoizeOne((scripts: HassEntity[]) => { + return scripts.map((script) => { + return { + ...script, + name: computeStateName(script), + }; + }); + }); + + private _columns = memoizeOne( + (_language): DataTableColumnContainer => { + return { + activate: { + title: "", + type: "icon-button", + template: (_toggle, script) => + html` + this._runScript(ev)} + > + `, + }, + name: { + title: this.hass.localize( + "ui.panel.config.script.picker.headers.name" + ), + sortable: true, + filterable: true, + direction: "asc", + grows: true, + template: (name, script: any) => html` + ${name} +

+ ${this.hass.localize("ui.card.automation.last_triggered")}: + ${script.attributes.last_triggered + ? formatDateTime( + new Date(script.attributes.last_triggered), + this.hass.language + ) + : this.hass.localize("ui.components.relative_time.never")} +
+ `, + }, + info: { + title: "", + type: "icon-button", + template: (_info, script) => html` + + `, + }, + edit: { + title: "", + type: "icon-button", + template: (_info, script: any) => html` + + + + `, + }, + }; + } + ); + protected render(): TemplateResult { return html` - - -
- ${this.hass.localize("ui.panel.config.script.picker.header")} -
-
- ${this.hass.localize("ui.panel.config.script.picker.introduction")} -

- - ${this.hass.localize( - "ui.panel.config.script.picker.learn_more" - )} - -

-
- - - ${this.scripts.length === 0 - ? html` -
-

- ${this.hass.localize( - "ui.panel.config.script.picker.no_scripts" - )} -

-
- ` - : this.scripts.map( - (script) => html` -
- - -
${computeStateName(script)}
-
-
- - - -
-
- ` - )} -
-
- - - - -
+ + + + + `; } private async _runScript(ev) { + ev.stopPropagation(); const script = ev.currentTarget.script as HassEntity; await triggerScript(this.hass, script.entity_id); showToast(this, { @@ -131,38 +160,34 @@ class HaScriptPicker extends LitElement { }); } + private _showInfo(ev) { + ev.stopPropagation(); + const entityId = ev.currentTarget.script.entity_id; + fireEvent(this, "hass-more-info", { entityId }); + } + + private _showHelp() { + showAlertDialog(this, { + title: this.hass.localize("ui.panel.config.script.caption"), + text: html` + ${this.hass.localize("ui.panel.config.script.picker.introduction")} +

+ + ${this.hass.localize("ui.panel.config.script.picker.learn_more")} + +

+ `, + }); + } + static get styles(): CSSResultArray { return [ haStyle, css` - :host { - display: block; - } - - ha-card { - margin-bottom: 56px; - } - - .script { - display: flex; - flex-direction: horizontal; - align-items: center; - padding: 0 8px 0 16px; - } - - .script > *:first-child { - margin-right: 8px; - } - - .script a[href], - paper-icon-button { - color: var(--primary-text-color); - } - - .actions { - display: flex; - } - ha-fab { position: fixed; bottom: 16px; @@ -187,10 +212,6 @@ class HaScriptPicker extends LitElement { right: auto; left: 24px; } - - a { - color: var(--primary-color); - } `, ]; } diff --git a/src/translations/en.json b/src/translations/en.json index 961a86dc8b..74f55b6c0a 100755 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -1230,7 +1230,10 @@ "no_scripts": "We couldn’t find any editable scripts", "add_script": "Add script", "trigger_script": "Trigger script", - "edit_script": "Edit script" + "edit_script": "Edit script", + "headers": { + "name": "Name" + } }, "editor": { "alias": "Name", From 8a6bd04543447bcbf2123444d3077889ec8a7f41 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Mon, 30 Mar 2020 16:08:36 +0200 Subject: [PATCH 62/66] Add default dashboard selection to profile page (#5360) * Add default dashboard selection to profile page * Comments * Console.bye --- src/components/ha-sidebar.ts | 11 ++- src/data/panel.ts | 17 ++-- src/fake_data/provide_hass.ts | 2 + src/layouts/home-assistant.ts | 4 +- .../dialog-lovelace-dashboard-detail.ts | 19 ++-- .../ha-config-lovelace-dashboards.ts | 6 +- src/panels/profile/ha-panel-profile.ts | 5 ++ src/panels/profile/ha-pick-dashboard-row.ts | 86 +++++++++++++++++++ src/state/connection-mixin.ts | 3 +- src/state/sidebar-mixin.ts | 14 +++ src/translations/en.json | 5 ++ src/types.ts | 1 + src/util/ha-pref-storage.ts | 1 + 13 files changed, 146 insertions(+), 28 deletions(-) create mode 100644 src/panels/profile/ha-pick-dashboard-row.ts diff --git a/src/components/ha-sidebar.ts b/src/components/ha-sidebar.ts index dd27336fa8..743037a7ba 100644 --- a/src/components/ha-sidebar.ts +++ b/src/components/ha-sidebar.ts @@ -32,7 +32,7 @@ import { classMap } from "lit-html/directives/class-map"; import { PaperIconItemElement } from "@polymer/paper-item/paper-icon-item"; import { computeRTL } from "../common/util/compute_rtl"; import { compare } from "../common/string/compare"; -import { getDefaultPanelUrlPath, getDefaultPanel } from "../data/panel"; +import { getDefaultPanel } from "../data/panel"; const SHOW_AFTER_SPACER = ["config", "developer-tools", "hassio"]; @@ -87,10 +87,8 @@ const computePanels = (hass: HomeAssistant): [PanelInfo[], PanelInfo[]] => { const beforeSpacer: PanelInfo[] = []; const afterSpacer: PanelInfo[] = []; - const defaultPage = getDefaultPanelUrlPath(); - Object.values(panels).forEach((panel) => { - if (!panel.title || panel.url_path === defaultPage) { + if (!panel.title || panel.url_path === hass.defaultPanel) { return; } (SHOW_AFTER_SPACER.includes(panel.url_path) @@ -143,7 +141,7 @@ class HaSidebar extends LitElement { } } - const defaultPanel = getDefaultPanel(hass.panels); + const defaultPanel = getDefaultPanel(hass); return html`