20201212.0 (#7952)

* [ci skip] Translation update

* Add link to the community forums to find more blueprints (#7947)

* Add link to the community forums to find more blueprints

* Apply suggestions from code review

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>

* Fix `ha-relative-time` usage for tags and sun (#7944)

* Bumped version to 20201212.0

Co-authored-by: HomeAssistant Azure <hello@home-assistant.io>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Philip Allgaier <mail@spacegaier.de>
This commit is contained in:
Bram Kragten 2020-12-12 20:57:28 +01:00 committed by GitHub
parent a70e6c49a1
commit 5409752817
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 166 additions and 55 deletions

View File

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

View File

@ -98,6 +98,12 @@ export class HaDataTable extends LitElement {
@property({ type: Boolean }) public hasFab = false;
/**
* Add an extra rows at the bottom of the datatabel
* @type {TemplateResult}
*/
@property({ attribute: false }) public appendRow?;
@property({ type: Boolean, attribute: "auto-height" })
public autoHeight = false;
@ -126,6 +132,8 @@ export class HaDataTable extends LitElement {
@query("slot[name='header']") private _header!: HTMLSlotElement;
private _items: DataTableRowData[] = [];
private _checkableRowsCount?: number;
private _checkedRows: string[] = [];
@ -318,10 +326,13 @@ export class HaDataTable extends LitElement {
@scroll=${this._saveScrollPos}
>
${scroll({
items: !this.hasFab
? this._filteredData
: [...this._filteredData, ...[{ empty: true }]],
items: this._items,
renderItem: (row: DataTableRowData, index) => {
if (row.append) {
return html`
<div class="mdc-data-table__row">${row.content}</div>
`;
}
if (row.empty) {
return html` <div class="mdc-data-table__row"></div> `;
}
@ -447,6 +458,20 @@ export class HaDataTable extends LitElement {
if (this.curRequest !== curRequest) {
return;
}
if (this.appendRow || this.hasFab) {
this._items = [...data];
if (this.appendRow) {
this._items.push({ append: true, content: this.appendRow });
}
if (this.hasFab) {
this._items.push({ empty: true });
}
} else {
this._items = data;
}
this._filteredData = data;
}

View File

@ -13,7 +13,7 @@ import type { HomeAssistant } from "../types";
class HaRelativeTime extends UpdatingElement {
@property({ attribute: false }) public hass!: HomeAssistant;
@property({ attribute: false }) public datetime?: string;
@property({ attribute: false }) public datetime?: string | Date;
private _interval?: number;

View File

@ -17,17 +17,17 @@ import "../../components/ha-switch";
import { PolymerChangedEvent } from "../../polymer-types";
import { haStyleDialog } from "../../resources/styles";
import { HomeAssistant } from "../../types";
import { DialogParams } from "./show-dialog-box";
import { DialogBoxParams } from "./show-dialog-box";
@customElement("dialog-box")
class DialogBox extends LitElement {
@property({ attribute: false }) public hass!: HomeAssistant;
@internalProperty() private _params?: DialogParams;
@internalProperty() private _params?: DialogBoxParams;
@internalProperty() private _value?: string;
public async showDialog(params: DialogParams): Promise<void> {
public async showDialog(params: DialogBoxParams): Promise<void> {
this._params = params;
if (params.prompt) {
this._value = params.defaultValue;
@ -55,8 +55,8 @@ class DialogBox extends LitElement {
return html`
<ha-dialog
open
?scrimClickAction=${this._params.prompt}
?escapeKeyAction=${this._params.prompt}
?scrimClickAction=${confirmPrompt}
?escapeKeyAction=${confirmPrompt}
@closed=${this._dialogClosed}
defaultAction="ignore"
.heading=${this._params.title
@ -140,10 +140,10 @@ class DialogBox extends LitElement {
}
private _dialogClosed(ev) {
if (ev.detail.action === "ignore") {
if (this._params?.prompt && ev.detail.action === "ignore") {
return;
}
this.closeDialog();
this._dismiss();
}
private _close(): void {

View File

@ -1,31 +1,31 @@
import { TemplateResult } from "lit-html";
import { fireEvent } from "../../common/dom/fire_event";
interface BaseDialogParams {
interface BaseDialogBoxParams {
confirmText?: string;
text?: string | TemplateResult;
title?: string;
warning?: boolean;
}
export interface AlertDialogParams extends BaseDialogParams {
export interface AlertDialogParams extends BaseDialogBoxParams {
confirm?: () => void;
}
export interface ConfirmationDialogParams extends BaseDialogParams {
export interface ConfirmationDialogParams extends BaseDialogBoxParams {
dismissText?: string;
confirm?: () => void;
cancel?: () => void;
}
export interface PromptDialogParams extends BaseDialogParams {
export interface PromptDialogParams extends BaseDialogBoxParams {
inputLabel?: string;
inputType?: string;
defaultValue?: string;
confirm?: (out?: string) => void;
}
export interface DialogParams
export interface DialogBoxParams
extends ConfirmationDialogParams,
PromptDialogParams {
confirm?: (out?: string) => void;
@ -37,10 +37,10 @@ export const loadGenericDialog = () => import("./dialog-box");
const showDialogHelper = (
element: HTMLElement,
dialogParams: DialogParams,
dialogParams: DialogBoxParams,
extra?: {
confirmation?: DialogParams["confirmation"];
prompt?: DialogParams["prompt"];
confirmation?: DialogBoxParams["confirmation"];
prompt?: DialogBoxParams["prompt"];
}
) =>
new Promise((resolve) => {

View File

@ -44,7 +44,7 @@ class MoreInfoSun extends LitElement {
>
<ha-relative-time
.hass=${this.hass}
.datetimeObj=${item === "ris" ? risingDate : settingDate}
.datetime=${item === "ris" ? risingDate : settingDate}
></ha-relative-time>
</div>
<div class="value">

View File

@ -60,6 +60,12 @@ export class HaTabsSubpageDataTable extends LitElement {
*/
@property({ type: Boolean }) public hasFab = false;
/**
* Add an extra rows at the bottom of the datatabel
* @type {TemplateResult}
*/
@property({ attribute: false }) public appendRow?;
/**
* Field with a unique id per entry in data.
* @type {String}
@ -171,6 +177,7 @@ export class HaTabsSubpageDataTable extends LitElement {
.noDataText=${this.noDataText}
.dir=${computeRTLDirection(this.hass)}
.clickable=${this.clickable}
.appendRow=${this.appendRow}
>
${!this.narrow
? html`

View File

@ -107,7 +107,16 @@ class DialogImportBlueprint extends LitElement {
<pre>${this._result.raw_data}</pre>
</ha-expansion-panel>`
: html`${this.hass.localize(
"ui.panel.config.blueprint.add.import_introduction"
"ui.panel.config.blueprint.add.import_introduction_link",
"community_link",
html`<a
href="https://www.home-assistant.io/get-blueprints"
target="_blank"
rel="noreferrer noopener"
>${this.hass.localize(
"ui.panel.config.blueprint.add.community_forums"
)}</a
>`
)}<paper-input
id="input"
.label=${this.hass.localize(

View File

@ -170,6 +170,23 @@ class HaBlueprintOverview extends LitElement {
"ui.panel.config.blueprint.overview.no_blueprints"
)}
hasFab
.appendRow=${html` <div
class="mdc-data-table__cell"
style="width: 100%; text-align: center;"
role="cell"
>
<a
href="https://www.home-assistant.io/get-blueprints"
target="_blank"
rel="noreferrer noopener"
>
<mwc-button
>${this.hass.localize(
"ui.panel.config.blueprint.overview.discover_more"
)}</mwc-button
>
</a>
</div>`}
>
<mwc-icon-button slot="toolbar-icon" @click=${this._showHelp}>
<ha-svg-icon .path=${mdiHelpCircle}></ha-svg-icon>

View File

@ -84,7 +84,7 @@ export class HaConfigTags extends SubscribeMixin(LitElement) {
${tag.last_scanned_datetime
? html`<ha-relative-time
.hass=${this.hass}
.datetimeObj=${tag.last_scanned_datetime}
.datetime=${tag.last_scanned_datetime}
></ha-relative-time>`
: this.hass.localize("ui.panel.config.tags.never_scanned")}
</div>`
@ -103,7 +103,7 @@ export class HaConfigTags extends SubscribeMixin(LitElement) {
${last_scanned_datetime
? html`<ha-relative-time
.hass=${this.hass}
.datetimeObj=${last_scanned_datetime}
.datetime=${last_scanned_datetime}
></ha-relative-time>`
: this.hass.localize("ui.panel.config.tags.never_scanned")}
`,

View File

@ -1472,12 +1472,14 @@
"confirm_delete_text": "Are you sure you want to delete this blueprint?",
"add_blueprint": "Import blueprint",
"use_blueprint": "Create automation",
"delete_blueprint": "Delete blueprint"
"delete_blueprint": "Delete blueprint",
"discover_more": "Discover more Blueprints"
},
"add": {
"header": "Import a blueprint",
"import_header": "Blueprint \"{name}\"",
"import_introduction": "You can import blueprints of other users from Github and the community forums. Enter the URL of the blueprint below.",
"import_introduction_link": "You can import blueprints of other users from Github and the {community_link}. Enter the URL of the blueprint below.",
"community_forums": "community forums",
"url": "URL of the blueprint",
"raw_blueprint": "Blueprint content",
"importing": "Loading blueprint...",

View File

@ -1673,7 +1673,7 @@
"confirm_restart": "Сигурни ли сте, че искате да рестартирате Home Assistant?",
"confirm_stop": "Сигурни ли сте, че искате да спрете Home Assistant?",
"heading": "Управление на сървъра",
"introduction": "Управляване на Home Assistant сървъра... от Home Assistant.",
"introduction": "Контрол на Home Assistant сървъра... от Home Assistant.",
"restart": "Рестартирай",
"stop": "Спри"
},

View File

@ -3184,7 +3184,7 @@
"close": "Tanca",
"empty_config": "Comença amb un panell buit",
"header": "Pren el control de la interfície d'usuari Lovelace",
"para": "Aquest panell Lovelace s'està gestionant per Home Assistant. S'actualitza automàticament quan hi ha noves entitats o nous components de Lovelace disponibles. Si prens el control, aquest panell no s'actualitzarà automàticament. Sempre pots crear un nou panell a configuració i fer-hi proves.",
"para": "Aquest panell Lovelace està gestionat per Home Assistant. S'actualitza automàticament quan hi ha noves entitats o nous components de Lovelace disponibles. Si prens el control, aquest panell no s'actualitzarà automàticament. Sempre pots crear un nou panell a configuració i fer-hi proves.",
"para_sure": "Estàs segur que vols prendre el control de la interfície d'usuari?",
"save": "Prendre el control",
"yaml_config": "Per ajudar a familiaritzar-te, aquí tens la configuració actual del teu panell Lovelace:",

View File

@ -1070,7 +1070,7 @@
},
"automation": {
"caption": "Automatisations",
"description": "Créer et modifier des automatisations",
"description": "Créez des règles de comportement personnalisées pour votre maison",
"dialog_new": {
"blueprint": {
"use_blueprint": "Utiliser un plan"
@ -1623,7 +1623,7 @@
},
"core": {
"caption": "Général",
"description": "Changer la configuration générale de votre Home Assistant.",
"description": "Unités de mesure, emplacement, fuseau horaire et autres paramètres généraux",
"section": {
"core": {
"core_config": {
@ -2281,7 +2281,7 @@
},
"script": {
"caption": "Scripts",
"description": "Créer et modifier des scripts.",
"description": "Exécuter une séquence d'actions",
"editor": {
"alias": "Nom",
"default_name": "Nouveau script",

View File

@ -901,6 +901,7 @@
"navigation": {
"areas": "Gebieden",
"automation": "Automatiseringen",
"blueprint": "Blueprints",
"core": "Algemeen",
"customize": "Aanpassingen",
"devices": "Apparaten",
@ -1047,7 +1048,7 @@
"confirmation_text": "Alle apparaten in dit gebied zullen niet meer toegewezen zijn.",
"confirmation_title": "Weet je zeker dat je dit gebied wilt verwijderen?"
},
"description": "Groepeer apparaten in gebieden",
"description": "Groepeer apparaten en entiteiten in gebieden",
"editor": {
"area_id": "Gebieds-ID",
"create": "Aanmaken",
@ -1072,7 +1073,7 @@
"description": "Maak aangepaste gedragsregels voor uw huis",
"dialog_new": {
"blueprint": {
"use_blueprint": "Gebruik een blauwdruk"
"use_blueprint": "Gebruik een Blueprint"
},
"header": "Een nieuwe automatisering maken",
"how": "Hoe wil je je nieuwe automatisering maken?",
@ -1165,12 +1166,12 @@
},
"alias": "Naam",
"blueprint": {
"blueprint_to_use": "Blauwdruk om te gebruiken",
"header": "Blauwdruk",
"blueprint_to_use": "Blueprint om te gebruiken",
"header": "Blueprint",
"inputs": "Inputs",
"manage_blueprints": "Beheer Blueprints",
"no_blueprints": "Je hebt geen Blueprints",
"no_inputs": "Deze blauwdruk heeft geen inputs."
"no_inputs": "Deze Blueprint heeft geen inputs."
},
"conditions": {
"add": "Voorwaarde toevoegen",
@ -1416,33 +1417,33 @@
},
"blueprint": {
"add": {
"error_no_url": "Voer de URL van de blauwdruk in.",
"error_no_url": "Voer de URL van de Blueprint in.",
"file_name": "Blueprint pad",
"header": "Voeg een nieuwe blauwdruk toe",
"import_btn": "Blauwdruk importeren",
"import_header": "Importeer \"{name}\" (type: {domain})",
"header": "Voeg een nieuwe Blueprint toe",
"import_btn": "Bekijk een Blueprint",
"import_header": "Blueprint \"{name}\"",
"import_introduction": "U kunt Blueprints van andere gebruikers importeren vanuit Github en de communityforums. Voer de URL van de Blueprint hieronder in.",
"importing": "Blauwdruk importeren ...",
"importing": "Blueprint importeren ...",
"raw_blueprint": "Blueprint inhoud",
"save_btn": "Bewaar blauwdruk",
"saving": "Blauwdruk opslaan ...",
"save_btn": "Blueprint importeren",
"saving": "Blueprint importeren ...",
"unsupported_blueprint": "Deze Blueprint wordt niet ondersteund",
"url": "URL van de blauwdruk"
"url": "URL van de Blueprint"
},
"caption": "Blueprints",
"description": "Beheer Blueprints",
"overview": {
"add_blueprint": "Blauwdruk importeren",
"confirm_delete_header": "Deze blauwdruk verwijderen?",
"add_blueprint": "Blueprint importeren",
"confirm_delete_header": "Deze Blueprint verwijderen?",
"confirm_delete_text": "Weet je zeker dat je deze blauwdruk wilt verwijderen?",
"delete_blueprint": "Verwijder Blueprint",
"header": "Blauwdrukeditor",
"header": "Blueprinteditor",
"headers": {
"domain": "Domein",
"file_name": "Bestandsnaam",
"name": "Naam"
},
"introduction": "Met de blueprinteditor kunt je blueprints maken en bewerken.",
"introduction": "Met de Blueprinteditor kunt je Blueprints maken en bewerken.",
"learn_more": "Meer informatie over Blueprints",
"use_blueprint": "Automatisering maken"
}

View File

@ -2,11 +2,13 @@
"config_entry": {
"disabled_by": {
"config_entry": "Config Girişi",
"device": "Cihaz",
"integration": "Entegrasyon",
"user": "Kullanıcı"
}
},
"groups": {
"owner": "Sahibi",
"system-admin": "Yöneticiler",
"system-read-only": "Salt Okunur Kullanıcılar",
"system-users": "Kullanıcılar"
@ -714,6 +716,16 @@
"service-picker": {
"service": "Servis"
},
"target-picker": {
"add_area_id": "Alanı seç",
"add_device_id": "Cihazı seç",
"add_entity_id": "Varlığı seç",
"expand_area_id": "Bu alanı içerdiği ayrı cihazlarda ve varlıklarda genişletin. Genişletme sonrası, alan değiştiğinde cihazları ve varlıkları güncellemeyecektir.",
"expand_device_id": "Bu cihazı ayrı varlıklarda genişletin. Genişletme sonrası, cihaz değiştiğinde varlıklar güncellenmeyecektir.",
"remove_area_id": "Alanı kaldır",
"remove_device_id": "Cihazı kaldır",
"remove_entity_id": "Varlığı kaldır"
},
"user-picker": {
"add_user": "Kullanıcı Ekle",
"no_user": "Kullanıcı yok",
@ -737,6 +749,7 @@
"editor": {
"confirm_delete": "Bu girişi silmek istediğinizden emin misiniz?",
"delete": "Sil",
"device_disabled": "Bu varlığın ait olduğu cihaz devre dışı.",
"enabled_cause": "{cause} tarafından devre dışı bırakılmış.",
"enabled_delay_confirm": "Etkinleştirilen varlıklar, {delay} saniye içinde Home Assistant'a eklenecek",
"enabled_description": "Devre dışı bırakılan varlıklar Home Assistant'a eklenmeyecek.",
@ -747,6 +760,7 @@
"icon_error": "Simgeler 'önek: simge adı' biçiminde olmalıdır, örneğin 'mdi: home'",
"name": "Ad",
"note": "Not: Bu, tüm entegrasyonlarda henüz çalışmayabilir.",
"open_device_settings": "Cihaz ayarlarını aç",
"unavailable": "Bu varlık şu anda kullanılamıyor.",
"update": "Güncelle"
},
@ -1404,11 +1418,13 @@
"blueprint": {
"add": {
"error_no_url": "Lütfen taslağın URL'sini girin.",
"header": "Yeni taslak ekle",
"file_name": "Taslak Yolu",
"header": "Taslağı içeri aktar",
"import_btn": "Taslağı içe aktar",
"import_header": "{name} ( {domain} ) içe aktar",
"import_header": "Taslak \"{name}\"",
"import_introduction": "Diğer kullanıcıların taslaklarını Github'dan ve topluluk forumlarından içe aktarabilirsiniz. Taslağın URL'sini aşağıya girin.",
"importing": "Taslak içe aktarılıyor...",
"raw_blueprint": "Taslak içeriği",
"save_btn": "Taslağı kaydet",
"saving": "Taslak kaydediliyor...",
"unsupported_blueprint": "Bu taslak desteklenmiyor",
@ -1419,13 +1435,17 @@
"overview": {
"add_blueprint": "Taslak ekle",
"confirm_delete_header": "Bu taslak silinsin mi?",
"confirm_delete_text": "Bu taslağı silmek istediğinizden emin misiniz",
"confirm_delete_text": "Bu taslağı silmek istediğinizden emin misiniz?",
"delete_blueprint": "Taslağı sil",
"header": "Taslak Düzenleyici",
"headers": {
"domain": "Alan adı",
"file_name": "Dosya adı",
"name": "Ad"
},
"introduction": "Taslak düzenleyici, taslakları oluşturmanıza ve düzenlemenize olanak tanır.",
"learn_more": "Taslaklar hakkında daha fazla bilgi edinin"
"learn_more": "Taslaklar hakkında daha fazla bilgi edinin",
"use_blueprint": "Otomasyon oluşturun"
}
},
"cloud": {
@ -1695,6 +1715,14 @@
"device_info": "Cihaz bilgisi",
"device_not_found": "Cihaz bulunamadı.",
"disabled": "Devre dışı",
"disabled_by": {
"config_entry": "Yapılandırma Girişi",
"integration": "Entegrasyon",
"user": "Kullanıcı"
},
"enabled_cause": "Cihaz {cause} tarafından devre dışı bırakıldı.",
"enabled_description": "Devre dışı bırakılan cihazlar gösterilmeyecek ve cihaza ait varlıklar devre dışı bırakılacak ve Home Assistant'a eklenmeyecek.",
"enabled_label": "Cihazı etkinleştir",
"entities": {
"add_entities_lovelace": "Tüm cihaz varlıklarını Lovelace kullanıcı arayüzüne ekle",
"disabled_entities": "+{count} {count, plural,\n one {engelli varlık}\n other {engelli varlıklar}\n}",
@ -1707,6 +1735,7 @@
"picker": {
"filter": {
"filter": "Filtre",
"hidden_devices": "{number} gizli {number, plural,\n one {device}\n other {devices}\n}",
"show_all": "Tümünü göster",
"show_disabled": "Devre dışı bırakılan aygıtları göster"
},
@ -1754,6 +1783,7 @@
},
"header": "Varlıklar",
"headers": {
"area": "Alan",
"entity_id": "Varlık kimliği",
"integration": "Entegrasyon",
"name": "Ad",
@ -2419,19 +2449,24 @@
"system_generated_users_not_editable": "Sistem tarafından oluşturulan kullanıcılar güncellenemiyor.",
"system_generated_users_not_removable": "Sistem tarafından oluşturulan kullanıcılar kaldırılamıyor.",
"unnamed_user": "Adsız Kullanıcı",
"update_user": "Güncelle"
"update_user": "Güncelle",
"username": "Kullanıcı Adı"
},
"picker": {
"add_user": "Kullanıcı Ekle",
"headers": {
"group": "Grup",
"is_active": "Etkin",
"is_owner": "Sahibi",
"name": "Ad",
"system": "Sistem"
"system": "Sistem",
"username": "Kullanıcı Adı"
}
},
"users_privileges_note": "Kullanıcı grubu özelliği devam eden bir çalışmadır. Kullanıcı örneği Kullanıcı Arabirimi üzerinden yönetemez. Yöneticilere erişimi doğru şekilde sınırlandırdığından emin olmak için tüm yönetim API uç noktalarını denetlemeye devam ediyoruz."
},
"zha": {
"add_device": "Cihaz Ekle",
"add_device_page": {
"discovered_text": "Cihazlar keşfedildikten sonra burada görünecektir.",
"discovery_text": "Keşfedilen cihazlar burada görünecektir. Cihaz (lar) ınız için talimatları izleyin ve cihazları eşleştirme moduna getirin.",
@ -2477,6 +2512,16 @@
"value": "Değer"
},
"description": "Zigbee Ev Otomasyonu ağ yönetimi",
"device_pairing_card": {
"CONFIGURED": "Yapılandırma Tamamlandı",
"CONFIGURED_status_text": "Başlatılıyor",
"INITIALIZED": "Başlatma Tamamlandı",
"INITIALIZED_status_text": "Cihaz kullanıma hazır",
"INTERVIEW_COMPLETE": "Görüşme Tamamlandı",
"INTERVIEW_COMPLETE_status_text": "Yapılandırılıyor",
"PAIRED": "Cihaz Bulundu",
"PAIRED_status_text": "Görüşme Başlatılıyor"
},
"devices": {
"header": "Zigbee Ev Otomasyonu - Cihaz"
},
@ -2492,6 +2537,7 @@
"unbind_button_label": "Grubu Çöz"
},
"groups": {
"add_group": "Grup Ekle",
"add_members": "Üye ekle",
"adding_members": "Üye Ekleme",
"caption": "Gruplar",
@ -2534,7 +2580,11 @@
"hint_wakeup": "Xiaomi sensörleri gibi bazı cihazlarda, onlarla etkileşime girerken cihazları uyanık tutan ~ 5 saniyelik aralıklarla basabileceğiniz bir uyanma düğmesi bulunur.",
"introduction": "Tek bir cihazı etkileyen ZHA komutlarını çalıştırın. Kullanılabilir komutların listesini görmek için bir cihaz seçin."
},
"title": "Zigbee Ev Otomasyonu"
"title": "Zigbee Ev Otomasyonu",
"visualization": {
"caption": "Görselleştirme",
"header": "Ağ Görselleştirme"
}
},
"zone": {
"add_zone": "Bölge Ekle",