Merge pull request #7891 from home-assistant/dev

This commit is contained in:
Bram Kragten 2020-12-03 17:22:08 +01:00 committed by GitHub
commit 2682c6e150
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 159 additions and 100 deletions

View File

@ -2,7 +2,7 @@ from setuptools import setup, find_packages
setup(
name="home-assistant-frontend",
version="20201202.0",
version="20201203.0",
description="The Home Assistant frontend",
url="https://github.com/home-assistant/home-assistant-polymer",
author="The Home Assistant Authors",

View File

@ -52,6 +52,7 @@ class HaBluePrintPicker extends LitElement {
.label=${this.label ||
this.hass.localize("ui.components.blueprint-picker.label")}
.disabled=${this.disabled}
horizontal-align="left"
>
<paper-listbox
slot="dropdown-content"
@ -110,6 +111,9 @@ class HaBluePrintPicker extends LitElement {
paper-listbox {
min-width: 200px;
}
paper-item {
cursor: pointer;
}
`;
}
}

View File

@ -18,11 +18,6 @@ export class HaSettingsRow extends LitElement {
protected render(): SVGTemplateResult {
return html`
<style>
paper-item-body {
padding-right: 16px;
}
</style>
<paper-item-body
?two-line=${!this.threeLine}
?three-line=${this.threeLine}
@ -43,6 +38,14 @@ export class HaSettingsRow extends LitElement {
align-self: auto;
align-items: center;
}
paper-item-body {
padding: 8px 16px 8px 0;
}
paper-item-body[two-line] {
min-height: calc(
var(--paper-item-body-two-line-min-height, 72px) - 16px
);
}
:host([narrow]) {
align-items: normal;
flex-direction: column;
@ -52,6 +55,9 @@ export class HaSettingsRow extends LitElement {
::slotted(ha-switch) {
padding: 16px 0;
}
div[secondary] {
white-space: normal;
}
`;
}
}

View File

@ -17,6 +17,7 @@ import { PolymerChangedEvent } from "../../../polymer-types";
import { haStyleDialog } from "../../../resources/styles";
import { HomeAssistant } from "../../../types";
import { AreaRegistryDetailDialogParams } from "./show-dialog-area-registry-detail";
import { navigate } from "../../../common/navigate";
class DialogAreaDetail extends LitElement {
@property({ attribute: false }) public hass!: HomeAssistant;
@ -154,6 +155,8 @@ class DialogAreaDetail extends LitElement {
} finally {
this._submitting = false;
}
navigate(this, "/config/areas/dashboard");
}
static get styles(): CSSResult[] {

View File

@ -24,7 +24,6 @@ import "./action/ha-automation-action";
import { fireEvent } from "../../../common/dom/fire_event";
import { haStyle } from "../../../resources/styles";
import { HassEntity } from "home-assistant-js-websocket";
import { navigate } from "../../../common/navigate";
import {
BlueprintOrError,
Blueprints,
@ -144,11 +143,6 @@ export class HaBlueprintAutomationEditor extends LitElement {
"ui.panel.config.automation.editor.blueprint.no_blueprints"
)
: html`<ha-circular-progress active></ha-circular-progress>`}
<mwc-button @click=${this._navigateBlueprints}>
${this.hass.localize(
"ui.panel.config.automation.editor.blueprint.manage_blueprints"
)}
</mwc-button>
</div>
${this.config.use_blueprint.path
@ -157,42 +151,37 @@ export class HaBlueprintAutomationEditor extends LitElement {
There is an error in this Blueprint: ${blueprint.error}
</p>`
: html`${blueprint?.metadata.description
? html`<p>${blueprint.metadata.description}</p>`
? html`<p class="card-content">
${blueprint.metadata.description}
</p>`
: ""}
${blueprint?.metadata?.input &&
Object.keys(blueprint.metadata.input).length
? html`<h3>
${this.hass.localize(
"ui.panel.config.automation.editor.blueprint.inputs"
)}
</h3>
${Object.entries(blueprint.metadata.input).map(
([key, value]) =>
html`<ha-settings-row .narrow=${this.narrow}>
<span slot="heading">${value?.name || key}</span>
<span slot="description"
>${value?.description}</span
>
${value?.selector
? html`<ha-selector
.hass=${this.hass}
.selector=${value.selector}
.key=${key}
.value=${(this.config.use_blueprint.input &&
this.config.use_blueprint.input[key]) ||
value?.default}
@value-changed=${this._inputChanged}
></ha-selector>`
: html`<paper-input
.key=${key}
required
.value=${this.config.use_blueprint.input &&
this.config.use_blueprint.input[key]}
@value-changed=${this._inputChanged}
no-label-float
></paper-input>`}
</ha-settings-row>`
)}`
? Object.entries(blueprint.metadata.input).map(
([key, value]) =>
html`<ha-settings-row .narrow=${this.narrow}>
<span slot="heading">${value?.name || key}</span>
<span slot="description">${value?.description}</span>
${value?.selector
? html`<ha-selector
.hass=${this.hass}
.selector=${value.selector}
.key=${key}
.value=${(this.config.use_blueprint.input &&
this.config.use_blueprint.input[key]) ||
value?.default}
@value-changed=${this._inputChanged}
></ha-selector>`
: html`<paper-input
.key=${key}
required
.value=${this.config.use_blueprint.input &&
this.config.use_blueprint.input[key]}
@value-changed=${this._inputChanged}
no-label-float
></paper-input>`}
</ha-settings-row>`
)
: html`<p class="padding">
${this.hass.localize(
"ui.panel.config.automation.editor.blueprint.no_inputs"
@ -268,10 +257,6 @@ export class HaBlueprintAutomationEditor extends LitElement {
});
}
private _navigateBlueprints() {
navigate(this, "/config/blueprint");
}
static get styles(): CSSResult[] {
return [
haStyle,
@ -281,9 +266,6 @@ export class HaBlueprintAutomationEditor extends LitElement {
}
.blueprint-picker-container {
padding: 16px;
display: flex;
align-items: center;
justify-content: space-between;
}
h3 {
margin: 16px;

View File

@ -112,7 +112,6 @@ class HaBlueprintOverview extends LitElement {
create: {
title: "",
type: narrow ? "icon-button" : undefined,
width: narrow ? undefined : "180px",
template: (_, blueprint: any) =>
blueprint.error
? ""
@ -126,8 +125,9 @@ class HaBlueprintOverview extends LitElement {
"ui.panel.config.blueprint.overview.use_blueprint"
)}
@click=${(ev) => this._createNew(ev)}
><ha-svg-icon .path=${mdiRobot}></ha-svg-icon
></mwc-icon-button>`
>
<ha-svg-icon .path=${mdiRobot}></ha-svg-icon>
</mwc-icon-button>`
: html`<mwc-button
.blueprint=${blueprint}
@click=${(ev) => this._createNew(ev)}

View File

@ -59,6 +59,9 @@ export class HuiThemeSelectEditor extends LitElement {
paper-dropdown-menu {
width: 100%;
}
paper-item {
cursor: pointer;
}
`;
}

View File

@ -210,7 +210,7 @@ export default <T extends Constructor<HassBaseEl>>(superClass: T) =>
this.__coreProgress = language;
try {
const result = await getTranslation(null, language);
this._updateResources(result.language, result.data);
await this._updateResources(result.language, result.data);
} finally {
this.__coreProgress = undefined;
}
@ -226,18 +226,26 @@ export default <T extends Constructor<HassBaseEl>>(superClass: T) =>
// before this.hass is even created. In this case our base state comes
// from this._pendingHass instead. Otherwise the first set of strings is
// overwritten when we call _updateHass the second time!
const baseHass = this.hass ?? this._pendingHass;
if (language !== (this.hass ?? this._pendingHass).language) {
// the language was changed, abort
return;
}
const resources = {
[language]: {
...baseHass?.resources?.[language],
...(this.hass ?? this._pendingHass)?.resources?.[language],
...data,
},
};
const changes: Partial<HomeAssistant> = { resources };
if (this.hass && language === this.hass.language) {
changes.localize = await computeLocalize(this, language, resources);
const changes: Partial<HomeAssistant> = {
resources,
localize: await computeLocalize(this, language, resources),
};
if (language === (this.hass ?? this._pendingHass).language) {
this._updateHass(changes);
}
this._updateHass(changes);
}
private _refetchCachedHassTranslations(

View File

@ -800,7 +800,7 @@
},
"areas": {
"caption": "Areas",
"description": "Group devices into areas",
"description": "Group devices and entities into areas",
"data_table": {
"area": "Area",
"devices": "Devices"
@ -1160,8 +1160,6 @@
"header": "Blueprint",
"blueprint_to_use": "Blueprint to use",
"no_blueprints": "You don't have any blueprints",
"manage_blueprints": "Manage Blueprints",
"inputs": "Inputs",
"no_inputs": "This blueprint doesn't have any inputs."
},
"modes": {
@ -2023,7 +2021,7 @@
},
"users": {
"caption": "Users",
"description": "Manage users",
"description": "Manage the Home Assistant user accounts",
"users_privileges_note": "The user group feature is a work in progress. The user will be unable to administer the instance via the UI. We're still auditing all management API endpoints to ensure that they correctly limit access to administrators.",
"picker": {
"headers": {

View File

@ -2474,6 +2474,7 @@
"CONFIGURED_status_text": "Initialisieren",
"INITIALIZED": "Initialisierung abgeschlossen",
"INITIALIZED_status_text": "Das Gerät ist einsatzbereit",
"INTERVIEW_COMPLETE": "Interview abgeschlossen",
"INTERVIEW_COMPLETE_status_text": "Konfigurieren",
"PAIRED": "Gerät gefunden"
},

View File

@ -2,6 +2,7 @@
"config_entry": {
"disabled_by": {
"config_entry": "Config Entry",
"device": "Device",
"integration": "Integration",
"user": "User"
}
@ -710,6 +711,16 @@
"service-picker": {
"service": "Service"
},
"target-picker": {
"add_area_id": "Pick area",
"add_device_id": "Pick device",
"add_entity_id": "Pick entity",
"expand_area_id": "Expand this area in the seperate devices and entities that it contains. After expanding it will not update the devices and entities when the area changes.",
"expand_device_id": "Expand this device in seperate entities. After expanding it will not update the entities when the device changes.",
"remove_area_id": "Remove area",
"remove_device_id": "Remove device",
"remove_entity_id": "Remove entity"
},
"user-picker": {
"add_user": "Add user",
"no_user": "No user",
@ -733,6 +744,7 @@
"editor": {
"confirm_delete": "Are you sure you want to delete this entry?",
"delete": "Delete",
"device_disabled": "The device of this entity is disabled.",
"enabled_cause": "Disabled by {cause}.",
"enabled_delay_confirm": "The enabled entities will be added to Home Assistant in {delay} seconds",
"enabled_description": "Disabled entities will not be added to Home Assistant.",
@ -743,6 +755,7 @@
"icon_error": "Icons should be in the format 'prefix:iconname', e.g. 'mdi:home'",
"name": "Name",
"note": "Note: This might not work yet with all integrations.",
"open_device_settings": "Open device settings",
"unavailable": "This entity is not currently available.",
"update": "Update"
},
@ -1030,7 +1043,7 @@
"confirmation_text": "All devices in this area will become unassigned.",
"confirmation_title": "Are you sure you want to delete this area?"
},
"description": "Manage areas in your home",
"description": "Group devices into areas",
"editor": {
"area_id": "Area ID",
"create": "Create",
@ -1052,7 +1065,7 @@
},
"automation": {
"caption": "Automations",
"description": "Manage automations",
"description": "Create custom behavior rules for your home",
"dialog_new": {
"blueprint": {
"use_blueprint": "Use a blueprint"
@ -1510,7 +1523,7 @@
"title": "Alexa"
},
"caption": "Home Assistant Cloud",
"description_features": "Control away from home, integrate with Alexa and Google Assistant.",
"description_features": "Control home when away and integrate with Alexa and Google Assistant",
"description_login": "Logged in as {email}",
"description_not_login": "Not logged in",
"dialog_certificate": {
@ -1605,7 +1618,7 @@
},
"core": {
"caption": "General",
"description": "Change your general Home Assistant configuration",
"description": "Unit system, location, time zone & other general parameters",
"section": {
"core": {
"core_config": {
@ -1667,6 +1680,7 @@
"unknown_condition": "Unknown condition"
},
"create": "Create automation with device",
"create_disable": "Can't create automation with disabled device",
"no_automations": "No automations",
"no_device_automations": "There are no automations available for this device.",
"triggers": {
@ -1692,9 +1706,18 @@
"no_devices": "No devices"
},
"delete": "Delete",
"description": "Manage connected devices",
"description": "Manage configured devices",
"device_info": "Device info",
"device_not_found": "Device not found.",
"disabled": "Disabled",
"disabled_by": {
"config_entry": "Config Entry",
"integration": "Integration",
"user": "User"
},
"enabled_cause": "The device is disabled by {cause}.",
"enabled_description": "Disabled devices will not be shown and entities belonging to the device will be disabled and not added to Home Assistant.",
"enabled_label": "Enable device",
"entities": {
"add_entities_lovelace": "Add to Lovelace",
"disabled_entities": "+{count} {count, plural,\n one {disabled entity}\n other {disabled entities}\n}",
@ -1704,14 +1727,25 @@
},
"name": "Name",
"no_devices": "No devices",
"picker": {
"filter": {
"filter": "Filter",
"hidden_devices": "{number} hidden {number, plural,\n one {device}\n other {devices}\n}",
"show_all": "Show all",
"show_disabled": "Show disabled devices"
},
"search": "Search devices"
},
"scene": {
"create": "Create scene with device",
"create_disable": "Can't create scene with disabled device",
"no_scenes": "No scenes",
"scenes": "Scenes"
},
"scenes": "Scenes",
"script": {
"create": "Create script with device",
"create_disable": "Can't create script with disabled device",
"no_scripts": "No scripts",
"scripts": "Scripts"
},
@ -1777,7 +1811,7 @@
"header": "Configure Home Assistant",
"helpers": {
"caption": "Helpers",
"description": "Manage elements that help build automations",
"description": "Elements that help build automations",
"dialog": {
"add_helper": "Add helper",
"add_platform": "Add {platform}",
@ -1809,7 +1843,7 @@
"copy_github": "For GitHub",
"copy_raw": "Raw Text",
"custom_uis": "Custom UIs:",
"description": "View info about your Home Assistant installation",
"description": "Version, system health and links to documentation",
"developed_by": "Developed by a bunch of awesome people.",
"documentation": "Documentation",
"frontend": "frontend-ui",
@ -1915,7 +1949,7 @@
},
"configure": "Configure",
"configured": "Configured",
"description": "Manage integrations",
"description": "Manage integrations with services, devices, ...",
"details": "Integration details",
"discovered": "Discovered",
"home_assistant_website": "Home Assistant website",
@ -2000,7 +2034,7 @@
"open": "Open"
}
},
"description": "Manage your Lovelace Dashboards",
"description": "Create customized sets of cards to control your home",
"resources": {
"cant_edit_yaml": "You are using Lovelace in YAML mode, therefore you cannot manage your resources through the UI. Manage them in configuration.yaml.",
"caption": "Resources",
@ -2199,7 +2233,7 @@
"scene": {
"activated": "Activated scene {name}.",
"caption": "Scenes",
"description": "Manage scenes",
"description": "Capture device states and easily recall them later",
"editor": {
"default_name": "New Scene",
"devices": {
@ -2243,7 +2277,7 @@
},
"script": {
"caption": "Scripts",
"description": "Manage scripts",
"description": "Execute a sequence of actions",
"editor": {
"alias": "Name",
"default_name": "New Script",
@ -2354,7 +2388,7 @@
"confirm_remove": "Are you sure you want to remove tag {tag}?",
"confirm_remove_title": "Remove tag?",
"create_automation": "Create automation with tag",
"description": "Manage tags",
"description": "Trigger automations when a NFC tag, QR code, etc. is scanned",
"detail": {
"companion_apps": "companion apps",
"create": "Create",
@ -2393,6 +2427,7 @@
"editor": {
"activate_user": "Activate user",
"active": "Active",
"active_tooltip": "Controls if user can login",
"admin": "Administrator",
"caption": "View user",
"change_password": "Change password",
@ -3411,10 +3446,13 @@
"change_password": {
"confirm_new_password": "Confirm New Password",
"current_password": "Current Password",
"error_new_is_old": "New password must be different than current password",
"error_new_mismatch": "Entered new password values do not match",
"error_required": "Required",
"header": "Change Password",
"new_password": "New Password",
"submit": "Submit"
"submit": "Submit",
"success": "Password changed successfully"
},
"current_user": "You are currently logged in as {fullName}.",
"customize_sidebar": {

View File

@ -1680,7 +1680,7 @@
"caption": "Appareils",
"confirm_delete": "Voulez-vous vraiment supprimer cet appareil ?",
"confirm_rename_entity_ids": "Voulez-vous aussi renommer les ID de vos entités?",
"confirm_rename_entity_ids_warning": "Cela ne changera aucune configuration (comme les automatismes, les scripts, les scènes, Lovelace) qui utilisent actuellement ces entités, vous devrez les mettre à jour vous-même.",
"confirm_rename_entity_ids_warning": "Cela ne changera aucune configuration (comme les automatisations, les scripts, les scènes, Lovelace) qui utilisent actuellement ces entités, vous devrez les mettre à jour vous-même.",
"data_table": {
"area": "Zone",
"battery": "Batterie",
@ -1744,6 +1744,7 @@
},
"header": "Entités",
"headers": {
"area": "Pièce",
"entity_id": "ID de l'entité",
"integration": "Intégration",
"name": "Nom",
@ -2471,6 +2472,16 @@
"value": "Valeur"
},
"description": "Gestion de réseau domotique Zigbee",
"device_pairing_card": {
"CONFIGURED": "Configuration terminée",
"CONFIGURED_status_text": "Initialisation",
"INITIALIZED": "Initialisation terminée",
"INITIALIZED_status_text": "L'appareil est prêt à être utilisé",
"INTERVIEW_COMPLETE": "Processus d'interrogation terminé",
"INTERVIEW_COMPLETE_status_text": "Configurer",
"PAIRED": "Appareil trouvé",
"PAIRED_status_text": "Démarrage du processus d'interrogation"
},
"devices": {
"header": "Zigbee Home Automation - Appareil"
},
@ -3358,7 +3369,7 @@
"button_detect": "Détecter",
"finish": "Suivant",
"intro": "Bonjour {name}, bienvenue dans Home Assistant. Comment voudriez-vous nommer votre maison?",
"intro_location": "Nous aimerions savoir où vous habitez. Ces informations vous aideront à afficher des informations et à configurer des automatismes basés sur le soleil. Ces données ne sont jamais partagées en dehors de votre réseau.",
"intro_location": "Nous aimerions savoir où vous habitez. Ces informations vous aideront à afficher des informations et à configurer des automatisations basés sur le soleil. Ces données ne sont jamais partagées en dehors de votre réseau.",
"intro_location_detect": "Nous pouvons vous aider à renseigner ces informations en adressant une demande unique à un service externe.",
"location_name": "Nom de votre installation Home Assistant",
"location_name_default": "Maison"

View File

@ -2936,6 +2936,7 @@
"name": "Luucht"
},
"logbook": {
"description": "Logbuch weist eng Lëscht vun Evenementer vun Entitéiten un.",
"name": "Logbuch"
},
"map": {
@ -3016,6 +3017,9 @@
"edit": "Änneren",
"none": "Keen"
},
"edit_badges": {
"panel_mode": "Dës Badge gi net ugewise well dës Usiicht am \"Panel Modus\" ass."
},
"edit_card": {
"add": "Kaart dobäisetzen",
"clear": "Läschen",
@ -3122,7 +3126,8 @@
"sub-element-editor": {
"types": {
"footer": "Fousszeilen Editeur",
"header": "Entête Editeur"
"header": "Entête Editeur",
"row": "Editeur vun der Réih vun Entitéiten"
}
},
"suggest_card": {

View File

@ -299,7 +299,7 @@
"on": "På"
},
"timer": {
"active": "aktiv",
"active": "Aktiv",
"idle": "Inaktiv",
"paused": "pauset"
},
@ -3435,7 +3435,7 @@
"description": "Dette vil skjule sidepanelet som standard, tilsvarende opplevelsen på en mobil.",
"header": "Skjul alltid sidepanelet"
},
"is_owner": "Du er en eier.",
"is_owner": "Du er en eier",
"language": {
"dropdown_label": "Språk",
"header": "Språk",

View File

@ -1756,7 +1756,7 @@
"button": "删除所选实体",
"confirm_partly_text": "在所选的 {selected} 个实体中有 {removable} 个可被删除。实体可被删除的条件是集成不再提供它们。有时,即使集成已删除,也必须先重新启动 Home Assistant 才能删除它们的实体。您确定要删除实体吗?",
"confirm_partly_title": "所选实体中只有 {number} 个可被删除。",
"confirm_text": "如果它们包含这些实体,则应将它们从 Lovelace 配置和自动化中删除。",
"confirm_text": "如果 Lovelace 配置和自动化中包含这些实体,请将它们一并删除。",
"confirm_title": "您要删除这 {number} 个实体吗?"
},
"search": "搜索实体",

View File

@ -597,21 +597,21 @@
"set": "設定",
"turned_off": "關閉",
"turned_on": "開啟",
"was_at_home": "狀態在家",
"was_at_state": "狀態{state}",
"was_away": "狀態離家",
"was_closed": "狀態關閉",
"was_connected": "狀態連線",
"was_disconnected": "狀態斷線",
"was_locked": "狀態上鎖",
"was_low": "狀態過低",
"was_normal": "狀態正常",
"was_opened": "狀態開啟",
"was_plugged_in": "狀態插上",
"was_safe": "狀態安全",
"was_unlocked": "狀態解鎖",
"was_unplugged": "狀態拔下",
"was_unsafe": "狀態不安全"
"was_at_home": "狀態在家",
"was_at_state": "狀態{state}",
"was_away": "狀態離家",
"was_closed": "狀態關閉",
"was_connected": "狀態連線",
"was_disconnected": "狀態斷線",
"was_locked": "狀態上鎖",
"was_low": "狀態過低",
"was_normal": "狀態正常",
"was_opened": "狀態開啟",
"was_plugged_in": "狀態插上",
"was_safe": "狀態安全",
"was_unlocked": "狀態解鎖",
"was_unplugged": "狀態拔下",
"was_unsafe": "狀態不安全"
}
},
"media-browser": {