From d5794c3e2e0b9747c260312fead5b0be2fe2f61f Mon Sep 17 00:00:00 2001 From: HomeAssistant Azure Date: Sat, 5 Sep 2020 00:32:46 +0000 Subject: [PATCH 01/23] [ci skip] Translation update --- translations/frontend/cs.json | 16 ++++++++++++-- translations/frontend/en.json | 34 ++++++++++++++++++++++++------ translations/frontend/nb.json | 16 ++++++++++++-- translations/frontend/ru.json | 22 ++++++++++++++----- translations/frontend/zh-Hans.json | 16 ++++++++++++-- translations/frontend/zh-Hant.json | 16 ++++++++++++-- 6 files changed, 100 insertions(+), 20 deletions(-) diff --git a/translations/frontend/cs.json b/translations/frontend/cs.json index ca77ec6015..135ed3075c 100644 --- a/translations/frontend/cs.json +++ b/translations/frontend/cs.json @@ -505,6 +505,7 @@ "back": "Zpět", "cancel": "Zrušit", "close": "Zavřít", + "continue": "Pokračovat", "delete": "Smazat", "error_required": "Povinné", "loading": "Načítání", @@ -689,8 +690,10 @@ "crop": "Oříznout" }, "more_info_control": { + "controls": "Ovládací prvky", "dismiss": "Zavřít dialog", "edit": "Upravit entitu", + "history": "Historie", "person": { "create_zone": "Vytvořit zónu z aktuálního umístění" }, @@ -1912,7 +1915,7 @@ "filter": "Nově načíst entity integrace Filter", "generic": "Nově načíst entity integrace Generic IP camera", "generic_thermostat": "Nově načíst entity integrace Generic thermostat", - "group": "Nově načíst skupiny", + "group": "Nově načíst skupiny, skupiny entit a notifikační služby", "heading": "Konfigurace se načítá", "history_stats": "Nově načíst entity integrace History stats", "homekit": "Nově načíst entity integrace HomeKit", @@ -1923,12 +1926,17 @@ "input_text": "Nově načíst pomocníky - texty", "introduction": "Některé části Home Assistant lze nově načíst bez nutnosti restartování. Nové načtení zahodí jejich aktuální konfiguraci a načte novou.", "min_max": "Nově načíst entity integrace Min/Max", + "mqtt": "Nově načíst entity integrace MQTT", "person": "Nově načíst osoby", "ping": "Nově načíst entity integrace Ping", - "rest": "Nově načíst entity integrace Rest", + "reload": "Nově načíst integraci {domain}", + "rest": "Nově načíst entity a notifikační služby integrace Rest", + "rpi_gpio": "Nově načíst entity integrace Raspberry Pi GPIO", "scene": "Nově načíst scény", "script": "Nově načíst skripty", + "smtp": "Nově načíst notifikační služby integrace SMTP", "statistics": "Nově načíst entity integrace Statistics", + "telegram": "Nově načíst notifikační služby integrace Telegram", "template": "Nově načíst entity integrace Template", "trend": "Nově načíst entity integrace Trend", "universal": "Nově načíst entity integrace Universal media player", @@ -2549,7 +2557,11 @@ } }, "cardpicker": { + "by_card": "Podle karty", + "by_entity": "Podle entity", "custom_card": "Vlastní", + "domain": "Doména", + "entity": "Entita", "no_description": "Žádný popis není k dispozici." }, "edit_card": { diff --git a/translations/frontend/en.json b/translations/frontend/en.json index 482cf10f23..e762f3d3c1 100644 --- a/translations/frontend/en.json +++ b/translations/frontend/en.json @@ -563,6 +563,8 @@ "no_history_found": "No state history found." }, "media-browser": { + "audio_not_supported": "Your browser does not support the audio element.", + "choose_player": "Choose Player", "choose-source": "Choose Source", "content-type": { "album": "Album", @@ -571,12 +573,16 @@ "playlist": "Playlist", "server": "Server" }, + "media_not_supported": "The Browser Media Player does not support this type of media", + "media_player": "Media Player", "media-player-browser": "Media Player Browser", "no_items": "No items", "pick": "Pick", "pick-media": "Pick Media", "play": "Play", - "play-media": "Play Media" + "play-media": "Play Media", + "video_not_supported": "Your browser does not support the video element.", + "web-browser": "Web Browser" }, "picture-upload": { "label": "Picture", @@ -634,7 +640,7 @@ "icon": "Icon Override", "icon_error": "Icons should be in the format 'prefix:iconname', e.g. 'mdi:home'", "name": "Name Override", - "note": "Note: this might not work yet with all integrations.", + "note": "Note: This might not work yet with all integrations.", "unavailable": "This entity is not currently available.", "update": "Update" }, @@ -1765,8 +1771,21 @@ "versions": "Obtaining information about firmware and command class versions", "wakeup": "Setting up support for wakeup queues and messages" }, + "node": { + "button": "Node Details", + "not_found": "Node not found" + }, + "nodes_table": { + "failed": "Failed", + "id": "ID", + "manufacturer": "Manufacturer", + "model": "Model", + "query_stage": "Query Stage", + "zwave_plus": "Z-Wave Plus" + }, "refresh_node": { "battery_note": "If the node is battery powered, be sure to wake it before proceeding", + "button": "Refresh Node", "complete": "Node Refresh Complete", "description": "This will tell OpenZWave to re-interview a node and update the node's command classes, capabilities, and values.", "node_status": "Node Status", @@ -2025,7 +2044,7 @@ "system": "System" } }, - "users_privileges_note": "The users group 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." + "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." }, "zha": { "add_device_page": { @@ -2063,7 +2082,7 @@ "clusters": { "header": "Clusters", "help_cluster_dropdown": "Select a cluster to view attributes and commands.", - "introduction": "Clusters are the building blocks for Zigbee functionality. They seperate functionality into logical units. There are client and server types and that are comprised of attributes and commands." + "introduction": "Clusters are the building blocks for Zigbee functionality. They separate functionality into logical units. There are client and server types and that are comprised of attributes and commands." }, "common": { "add_devices": "Add Devices", @@ -2196,7 +2215,7 @@ "true": "True" }, "node_management": { - "add_to_group": "Add To Group", + "add_to_group": "Add to Group", "entities": "Entities of this node", "entity_info": "Entity Information", "exclude_entity": "Exclude this entity from Home Assistant", @@ -2209,11 +2228,11 @@ "node_to_control": "Node to control", "nodes": "Nodes", "nodes_hint": "Select node to view per-node options", - "nodes_in_group": "Other Nodes in this group:", + "nodes_in_group": "Other nodes in this group:", "pooling_intensity": "Polling intensity", "protection": "Protection", "remove_broadcast": "Remove Broadcast", - "remove_from_group": "Remove From Group", + "remove_from_group": "Remove from Group", "set_protection": "Set Protection" }, "ozw_log": { @@ -2575,6 +2594,7 @@ "options": "More options", "pick_card": "Which card would you like to add?", "pick_card_view_title": "Which card would you like to add to your {name} view?", + "search_cards": "Search cards", "show_code_editor": "Show Code Editor", "show_visual_editor": "Show Visual Editor", "toggle_editor": "Toggle Editor", diff --git a/translations/frontend/nb.json b/translations/frontend/nb.json index 235f6930b8..db02e1f81a 100644 --- a/translations/frontend/nb.json +++ b/translations/frontend/nb.json @@ -489,6 +489,7 @@ "back": "Tilbake", "cancel": "Avbryt", "close": "Lukk", + "continue": "Fortsette", "delete": "Slett", "error_required": "Nødvendig", "loading": "Laster", @@ -672,8 +673,10 @@ "crop": "Beskjære" }, "more_info_control": { + "controls": "Kontroller", "dismiss": "Avvis dialogboksen", "edit": "Redigér entitet", + "history": "Historie", "person": { "create_zone": "Opprett sone fra gjeldende plassering" }, @@ -1866,7 +1869,7 @@ "filter": "Last inn filter entiteter på nytt", "generic": "Last inn generiske IP-kamera entiteter på nytt", "generic_thermostat": "Last inn generiske termostat entiteter på nytt", - "group": "Last inn grupper på nytt", + "group": "Laste inn grupper, gruppere enheter og varsle tjenester på nytt", "heading": "YAML -Konfigurasjon lastes på nytt", "history_stats": "Last inn historiske tilstander på nytt", "homekit": "Last inn HomeKit på nytt", @@ -1877,12 +1880,17 @@ "input_text": "Last inn inndata tekst på nytt", "introduction": "Noen deler av Home Assistant kan laste inn uten å kreve omstart. Hvis du trykker last på nytt, vil du bytte den nåværende konfigurasjonen med den nye.", "min_max": "Last inn min/maks entiteter på nytt", + "mqtt": "Last inn mqtt-enheter på nytt", "person": "Last inn personer på nytt", "ping": "Last inn ping binære sensor entiteter på nytt", - "rest": "Last inn REST entiteter på nytt", + "reload": "Last inn {domain} på nytt", + "rest": "Last inn hvileenheter på nytt og varsle tjenester", + "rpi_gpio": "Last inn Raspberry Pi GPIO-enheter på nytt", "scene": "Last inn scener på nytt", "script": "Last inn skript på nytt", + "smtp": "Last inn smtp-varslingstjenester på nytt", "statistics": "Last inn statistiske entiteter på nytt", + "telegram": "Last inn telegram varslingstjenester på nytt", "template": "Laste inn mal entiteter på nytt", "trend": "Laste inn trend entiteter på nytt", "universal": "Laste inn universelle mediespiller entiteter på nytt", @@ -2493,7 +2501,11 @@ } }, "cardpicker": { + "by_card": "Med kort", + "by_entity": "Etter enhet", "custom_card": "Tilpasset", + "domain": "Domene", + "entity": "Entitet", "no_description": "Ingen beskrivelse tilgjengelig." }, "edit_card": { diff --git a/translations/frontend/ru.json b/translations/frontend/ru.json index b1acc8ea5f..110d802140 100644 --- a/translations/frontend/ru.json +++ b/translations/frontend/ru.json @@ -505,6 +505,7 @@ "back": "Назад", "cancel": "Отменить", "close": "Закрыть", + "continue": "Продолжить", "delete": "Удалить", "error_required": "Обязательное поле", "loading": "Загрузка", @@ -689,8 +690,10 @@ "crop": "Обрезать" }, "more_info_control": { + "controls": "Управление", "dismiss": "Закрыть диалог", "edit": "Изменить объект", + "history": "История", "person": { "create_zone": "Создать зону из текущего местоположения" }, @@ -1209,7 +1212,7 @@ "title": "Alexa" }, "caption": "Home Assistant Cloud", - "description_features": "Управление сервером вдали от дома, интеграция с Alexa и Google Assistant", + "description_features": "Удалённый доступ к серверу, интеграция с Alexa и Google Assistant", "description_login": "{email}", "description_not_login": "Вход не выполнен", "dialog_certificate": { @@ -1255,7 +1258,7 @@ "email": "Адрес электронной почты", "email_error_msg": "Неверный адрес электронной почты.", "forgot_password": "забыли пароль?", - "introduction": "Home Assistant Cloud обеспечивает безопасный доступ к Вашему серверу, даже если Вы находитесь вдали от дома. Также это даёт возможность подключения к функциям облачных сервисов Amazon Alexa и Google Assistant.", + "introduction": "Home Assistant Cloud обеспечивает безопасный доступ к Вашему серверу, даже если Вы находитесь вдали от дома. Также это даёт возможность простого подключения к функциям облачных сервисов Amazon Alexa и Google Assistant.", "introduction2": "Услуга предоставляется нашим партнером ", "introduction2a": ", компанией от основателей Home Assistant и Hass.io.", "introduction3": "Home Assistant Cloud предлагает одноразовый бесплатный пробный период продолжительностью один месяц. Для активации пробного периода платёжная информация не требуется.", @@ -1402,7 +1405,7 @@ }, "scripts": "Сценарии", "unknown_error": "Неизвестная ошибка.", - "unnamed_device": "Безымянное устройство", + "unnamed_device": "Устройство без названия", "update": "Обновить" }, "entities": { @@ -1902,7 +1905,7 @@ "filter": "Перезагрузить объекты интеграции \"Filter\"", "generic": "Перезагрузить объекты интеграции \"Generic IP Camera\"", "generic_thermostat": "Перезагрузить объекты интеграции \"Generic Thermostat\"", - "group": "Перезагрузить группы", + "group": "Перезагрузить группы, объекты групп и службы уведомлений", "heading": "Перезагрузка конфигурации YAML", "history_stats": "Перезагрузить объекты интеграции \"History Stats\"", "homekit": "Перезагрузить HomeKit", @@ -1913,12 +1916,17 @@ "input_text": "Перезагрузить вспомогательные элементы ввода текста", "introduction": "Некоторые компоненты Home Assistant можно перезагрузить без необходимости перезапуска всей системы. Перезагрузка выгружает текущую конфигурацию YAML и загружает новую.", "min_max": "Перезагрузить объекты интеграции \"Min/Max\"", + "mqtt": "Перезагрузить объекты интеграции \"MQTT\"", "person": "Перезагрузить персоны", "ping": "Перезагрузить объекты интеграции \"Ping (ICMP)\"", - "rest": "Перезагрузить объекты интеграции \"REST\"", + "reload": "Перезагрузить {domain}", + "rest": "Перезагрузить объекты и службы уведомлений интеграции \"REST\"", + "rpi_gpio": "Перезагрузить объекты интеграции \"Raspberry Pi GPIO\"", "scene": "Перезагрузить сцены", "script": "Перезагрузить сценарии", + "smtp": "Перезагрузить службы уведомлений SMTP", "statistics": "Перезагрузить объекты интеграции \"Statistics\"", + "telegram": "Перезагрузить службы уведомлений Telegram", "template": "Перезагрузить объекты шаблонов", "trend": "Перезагрузить объекты интеграции \"Trend\"", "universal": "Перезагрузить объекты интеграции \"Universal Media Player\"", @@ -2539,7 +2547,11 @@ } }, "cardpicker": { + "by_card": "Карточки", + "by_entity": "Объекты", "custom_card": "Custom", + "domain": "Домен", + "entity": "Объект", "no_description": "Описание недоступно." }, "edit_card": { diff --git a/translations/frontend/zh-Hans.json b/translations/frontend/zh-Hans.json index a318db0442..1e7b9bfa0a 100644 --- a/translations/frontend/zh-Hans.json +++ b/translations/frontend/zh-Hans.json @@ -505,6 +505,7 @@ "back": "返回", "cancel": "取消", "close": "关闭", + "continue": "继续", "delete": "删除", "error_required": "必填", "loading": "加载中", @@ -689,8 +690,10 @@ "crop": "剪裁" }, "more_info_control": { + "controls": "控制项", "dismiss": "关闭对话框", "edit": "编辑实体", + "history": "历史", "person": { "create_zone": "从当前位置创建地点" }, @@ -1912,7 +1915,7 @@ "filter": "重载 filter 实体", "generic": "重载通用 IP 摄像机实体", "generic_thermostat": "重载通用恒温器实体", - "group": "重载分组", + "group": "重载分组、分组实体及通知服务", "heading": "配置重载", "history_stats": "重载历史记录统计实体", "homekit": "重载 HomeKit", @@ -1923,12 +1926,17 @@ "input_text": "重载文字输入", "introduction": "Home Assistant 中的部分配置可以直接重载,而无需重启服务。点击重载按钮将重新载入新的配置。", "min_max": "重载最小值/最大值实体", + "mqtt": "重载 mqtt 实体", "person": "重载人员", "ping": "重载 ping 二元传感器实体", - "rest": "重载 REST 实体", + "reload": "重载{domain}", + "rest": "重载 REST 实体及通知服务", + "rpi_gpio": "重载树莓派 GPIO 实体", "scene": "重载场景", "script": "重载脚本", + "smtp": "重载 smtp 通知服务", "statistics": "重载 statistics 实体", + "telegram": "重载 telegram 通知服务", "template": "重载模板实体", "trend": "重载 trend 实体", "universal": "重载通用媒体播放器实体", @@ -2549,7 +2557,11 @@ } }, "cardpicker": { + "by_card": "按卡片", + "by_entity": "按实体", "custom_card": "自定义", + "domain": "域", + "entity": "实体", "no_description": "没有描述。" }, "edit_card": { diff --git a/translations/frontend/zh-Hant.json b/translations/frontend/zh-Hant.json index 78b42e133e..025a931264 100644 --- a/translations/frontend/zh-Hant.json +++ b/translations/frontend/zh-Hant.json @@ -505,6 +505,7 @@ "back": "上一步", "cancel": "取消", "close": "關閉", + "continue": "繼續", "delete": "刪除", "error_required": "必填", "loading": "讀取中", @@ -689,8 +690,10 @@ "crop": "裁切" }, "more_info_control": { + "controls": "控制", "dismiss": "忽略對話", "edit": "編輯實體", + "history": "歷史", "person": { "create_zone": "使用目前位置新增區域" }, @@ -1912,7 +1915,7 @@ "filter": "重新載入過濾器實體", "generic": "重新載入通用 IP 攝影機實體", "generic_thermostat": "重新載入通用溫控器實體", - "group": "重新載入群組", + "group": "重新載入群組、群組實體及通知服務", "heading": "YAML 設定新載入中", "history_stats": "重新載入歷史狀態實體", "homekit": "重新載入 Homekit", @@ -1923,12 +1926,17 @@ "input_text": "重新載入輸入文字", "introduction": "Home Assistant 中部分設定無須重啟即可重新載入生效。點選重新載入按鈕,即可解除目前 YAML 設定,並重新載入最新設定。", "min_max": "重新載入最低/最高實體", + "mqtt": "重新載入 MQTT 實體", "person": "重新載入人員", "ping": "重新載入 Pung 二進位傳感器實體", - "rest": "重新載入剩餘實體", + "reload": "重新載入{domain}", + "rest": "重新載入剩餘實體及通知服務", + "rpi_gpio": "重新載入 Raspberry Pi GPIO 實體", "scene": "重新載入場景", "script": "重新載入腳本", + "smtp": "重新載入 SMTP 通知服務", "statistics": "重新載入統計資訊實體", + "telegram": "重新載入 Telegram 通知服務", "template": "重新載入範例實體", "trend": "重新載入趨勢實體", "universal": "重新載入通用媒體播放器實體", @@ -2549,7 +2557,11 @@ } }, "cardpicker": { + "by_card": "以面板", + "by_entity": "以實體", "custom_card": "自訂面板", + "domain": "區域", + "entity": "實體", "no_description": "無描述可使用。" }, "edit_card": { From 879011c8e9e2160b3c72ab3742883c6849e1ee12 Mon Sep 17 00:00:00 2001 From: Donnie Date: Sat, 5 Sep 2020 06:51:52 -0700 Subject: [PATCH 02/23] Fix incorrect link to mode documentation in automation editor (#6793) From 8f8a2cea56afb25488ccd521407d8698498014c6 Mon Sep 17 00:00:00 2001 From: Pawel Date: Sun, 6 Sep 2020 00:35:34 +0200 Subject: [PATCH 03/23] Don't show source select dialog when media player Unavailable. (#6799) --- src/dialogs/more-info/controls/more-info-media_player.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dialogs/more-info/controls/more-info-media_player.ts b/src/dialogs/more-info/controls/more-info-media_player.ts index aefc6bf92f..45dee3e224 100644 --- a/src/dialogs/more-info/controls/more-info-media_player.ts +++ b/src/dialogs/more-info/controls/more-info-media_player.ts @@ -130,7 +130,7 @@ class MoreInfoMediaPlayer extends LitElement { ` : ""} - ${stateObj.state !== "off" && + ${![UNAVAILABLE, UNKNOWN, "off"].includes(stateObj.state) && supportsFeature(stateObj, SUPPORT_SELECT_SOURCE) && stateObj.attributes.source_list?.length ? html` From 3fd7899b9323fc05ba6d9d75c74062ae18275ad9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20S=C3=B8rensen?= Date: Sun, 6 Sep 2020 02:16:50 +0200 Subject: [PATCH 04/23] Display services as services and not devices (#6798) * Display services as services and not devices * remove seperator * Add comma * Update src/panels/config/integrations/ha-integration-card.ts Co-authored-by: Bram Kragten * Fix spacing * Remove check Co-authored-by: Bram Kragten --- .../integrations/ha-integration-card.ts | 34 ++++++++++++++++--- src/translations/en.json | 1 + 2 files changed, 31 insertions(+), 4 deletions(-) diff --git a/src/panels/config/integrations/ha-integration-card.ts b/src/panels/config/integrations/ha-integration-card.ts index dddeaf6754..a1625c7c2c 100644 --- a/src/panels/config/integrations/ha-integration-card.ts +++ b/src/panels/config/integrations/ha-integration-card.ts @@ -137,6 +137,7 @@ export class HaIntegrationCard extends LitElement { private _renderSingleEntry(item: ConfigEntryExtended): TemplateResult { const devices = this._getDevices(item); + const services = this._getServices(item); const entities = this._getEntities(item); return html` @@ -168,7 +169,7 @@ export class HaIntegrationCard extends LitElement {

${item.localized_domain_name === item.title ? "" : item.title}

- ${devices.length || entities.length + ${devices.length || services.length || entities.length ? html`
${devices.length @@ -180,10 +181,22 @@ export class HaIntegrationCard extends LitElement { "count", devices.length )}${services.length ? "," : ""} + ` + : ""} + ${services.length + ? html` + ${this.hass.localize( + "ui.panel.config.integrations.config_entry.services", + "count", + services.length + )} ` : ""} - ${devices.length && entities.length + ${(devices.length || services.length) && entities.length ? this.hass.localize("ui.common.and") : ""} ${entities.length @@ -304,8 +317,21 @@ export class HaIntegrationCard extends LitElement { if (!this.deviceRegistryEntries) { return []; } - return this.deviceRegistryEntries.filter((device) => - device.config_entries.includes(configEntry.entry_id) + return this.deviceRegistryEntries.filter( + (device) => + device.config_entries.includes(configEntry.entry_id) && + device.entry_type !== "service" + ); + } + + private _getServices(configEntry: ConfigEntry): DeviceRegistryEntry[] { + if (!this.deviceRegistryEntries) { + return []; + } + return this.deviceRegistryEntries.filter( + (device) => + device.config_entries.includes(configEntry.entry_id) && + device.entry_type === "service" ); } diff --git a/src/translations/en.json b/src/translations/en.json index 9977bae247..8e4ced5344 100755 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -1638,6 +1638,7 @@ "config_entry": { "devices": "{count} {count, plural,\n one {device}\n other {devices}\n}", "entities": "{count} {count, plural,\n one {entity}\n other {entities}\n}", + "services": "{count} {count, plural,\n one {service}\n other {services}\n}", "rename": "Rename", "options": "Options", "system_options": "System options", From d69333dea4c37ad3a71830edec2ba06055bb218a Mon Sep 17 00:00:00 2001 From: HomeAssistant Azure Date: Sun, 6 Sep 2020 00:32:31 +0000 Subject: [PATCH 05/23] [ci skip] Translation update --- translations/frontend/cs.json | 26 +++++++++++++++--- translations/frontend/en.json | 1 + translations/frontend/fr.json | 40 ++++++++++++++++++++++++--- translations/frontend/pt.json | 42 +++++++++++++++++++++-------- translations/frontend/ru.json | 43 ++++++++++++++++++++++++------ translations/frontend/zh-Hans.json | 22 ++++++++++++++- translations/frontend/zh-Hant.json | 24 +++++++++++++++-- 7 files changed, 169 insertions(+), 29 deletions(-) diff --git a/translations/frontend/cs.json b/translations/frontend/cs.json index 135ed3075c..b8ec36694b 100644 --- a/translations/frontend/cs.json +++ b/translations/frontend/cs.json @@ -563,6 +563,8 @@ "no_history_found": "Historie stavu chybí." }, "media-browser": { + "audio_not_supported": "Váš prohlížeč nepodporuje element \"audio\".", + "choose_player": "Vyberte přehrávač", "choose-source": "Zvolte zdroj", "content-type": { "album": "Album", @@ -571,12 +573,16 @@ "playlist": "Seznam skladeb", "server": "Server" }, + "media_not_supported": "Přehrávač médií v prohlížeči nepodporuje tento typ média", + "media_player": "Přehrávač médií", "media-player-browser": "Prohlížeč přehrávače médií", "no_items": "Žádné položky", "pick": "Vybrat", "pick-media": "Vybrat média", "play": "Přehrát", - "play-media": "Přehrát média" + "play-media": "Přehrát média", + "video_not_supported": "Váš prohlížeč nepodporuje element \"video\".", + "web-browser": "Webový prohlížeč" }, "picture-upload": { "label": "Obrázek", @@ -634,7 +640,7 @@ "icon": "Nahrazení ikony", "icon_error": "Ikony by měly být ve formátu 'prefix:nazevikony', např. 'mdi:home'", "name": "Přepsání názvu", - "note": "Poznámka: to nemusí fungovat se všemi integracemi.", + "note": "Poznámka: U všech integrací to ještě nemusí fungovat.", "unavailable": "Tato entita není momentálně k dispozici.", "update": "Aktualizovat" }, @@ -1765,8 +1771,21 @@ "versions": "Získávám informace o verzích firmwaru a typech příkazů", "wakeup": "Nastavuji podporu pro probouzecí fronty a zprávy" }, + "node": { + "button": "Podrobnosti uzlu", + "not_found": "Uzel nenalezen" + }, + "nodes_table": { + "failed": "Selhalo", + "id": "ID", + "manufacturer": "Výrobce", + "model": "Model", + "query_stage": "Fáze dotazu", + "zwave_plus": "Z-Wave Plus" + }, "refresh_node": { "battery_note": "Pokud je uzel napájen z baterie, nezapomeňte jej probudit, než budete pokračovat", + "button": "Obnovit uzel", "complete": "Obnova uzlu dokončena", "description": "Toto řekne OpenZWave, aby znovu provedl komunikaci s uzlem a aktualizoval typy příkazů, schopnosti a hodnoty uzlu.", "node_status": "Stav uzlu", @@ -2025,7 +2044,7 @@ "system": "Systémový" } }, - "users_privileges_note": "Skupina uživatelů je v přípravě. Uživatel nebude moci spravovat instanci prostřednictvím uživatelského rozhraní. Stále kontrolujeme všechny koncové body API pro správu, abychom zajistili, že správně omezují přístup." + "users_privileges_note": "Skupiny uživatelů jsou v přípravě. Uživatel je nebude moci spravovat prostřednictvím uživatelského rozhraní. Stále kontrolujeme API pro správu, abychom zajistili, že správně omezuje přístup pouze pro administrátory." }, "zha": { "add_device_page": { @@ -2575,6 +2594,7 @@ "options": "Více možností", "pick_card": "Kterou kartu chcete přidat?", "pick_card_view_title": "Kterou kartu byste chtěli přidat do svého {name} pohledu?", + "search_cards": "Vyhledat karty", "show_code_editor": "Zobrazit editor kódu", "show_visual_editor": "Zobrazit vizuální editor", "toggle_editor": "Přepnout Editor", diff --git a/translations/frontend/en.json b/translations/frontend/en.json index e762f3d3c1..e320c6c31e 100644 --- a/translations/frontend/en.json +++ b/translations/frontend/en.json @@ -1552,6 +1552,7 @@ "reload_restart_confirm": "Restart Home Assistant to finish reloading this integration", "rename": "Rename", "restart_confirm": "Restart Home Assistant to finish removing this integration", + "services": "{count} {count, plural,\n one {service}\n other {services}\n}", "settings_button": "Edit settings for {integration}", "system_options": "System options", "system_options_button": "System options for {integration}", diff --git a/translations/frontend/fr.json b/translations/frontend/fr.json index 939706d0e1..86646023b1 100644 --- a/translations/frontend/fr.json +++ b/translations/frontend/fr.json @@ -505,6 +505,7 @@ "back": "Retour", "cancel": "Annuler", "close": "Fermer", + "continue": "Continuer", "delete": "Supprimer", "error_required": "Obligatoire", "loading": "Chargement", @@ -562,6 +563,8 @@ "no_history_found": "Aucun historique des valeurs trouvé." }, "media-browser": { + "audio_not_supported": "Votre navigateur ne prend pas en charge l'élément audio.", + "choose_player": "Choisissez le lecteur", "choose-source": "Choisissez la source", "content-type": { "album": "Album", @@ -570,12 +573,16 @@ "playlist": "Liste de lecture", "server": "Serveur" }, + "media_not_supported": "Le Browser Media Player ne prend pas en charge ce type de média", + "media_player": "Lecteur multimédia", "media-player-browser": "Lecteur multimédia", "no_items": "Aucun éléments", "pick": "Choisir", "pick-media": "Choisissez un média", "play": "Lecture", - "play-media": "Lire le média" + "play-media": "Lire le média", + "video_not_supported": "Votre navigateur ne prend pas en charge l'élément vidéo.", + "web-browser": "Navigateur web" }, "picture-upload": { "label": "Image", @@ -689,8 +696,10 @@ "crop": "Recadrer" }, "more_info_control": { + "controls": "Contrôles", "dismiss": "Fermer la fenêtre de dialogue", "edit": "Modifier l'entité", + "history": "Historique", "person": { "create_zone": "Créer une zone à partir de l'emplacement actuel" }, @@ -1762,8 +1771,21 @@ "versions": "Obtention d'informations sur les versions des microprogrammes et des classes de commande", "wakeup": "Configuration de la prise en charge des files d'attente et des messages de réveil" }, + "node": { + "button": "Détails du nœud", + "not_found": "Nœud introuvable" + }, + "nodes_table": { + "failed": "Echec", + "id": "ID", + "manufacturer": "Fabricant", + "model": "Modèle", + "query_stage": "Étape de requête", + "zwave_plus": "Z-Wave Plus" + }, "refresh_node": { "battery_note": "Si le nœud est alimenté par batterie, assurez-vous de l'activer avant de continuer", + "button": "Actualiser le nœud", "complete": "Actualisation du nœud terminée", "description": "Cela indiquera à OpenZWave de réinterroger le nœud et de le mettre à jour (commandes, possibilités et valeurs).", "node_status": "État du nœud", @@ -1923,12 +1945,17 @@ "input_text": "Recharger les entrées de texte (input text)", "introduction": "Certaines parties de Home Assistant peuvent être rechargées sans nécessiter de redémarrage. Le fait de cliquer sur recharger déchargera leur configuration actuelle et chargera la nouvelle.", "min_max": "Recharger les entités min/max", + "mqtt": "Recharger les entités mqtt", "person": "Recharger les personnes", "ping": "Recharger les entités de capteur binaire ping", - "rest": "Recharger les entités REST", + "reload": "Recharger {domain}", + "rest": "Recharger les entités REST et notifier les services", + "rpi_gpio": "Recharger les entités GPIO du Raspberry Pi", "scene": "Recharger les scènes", "script": "Recharger les scripts", + "smtp": "Recharger les services de notification smtp", "statistics": "Recharger les entités de statistiques", + "telegram": "Recharger les services de notification de telegram", "template": "Recharger les entités modèles", "trend": "Recharger les entités de tendance", "universal": "Recharger les entités de lecteur média universel", @@ -2017,7 +2044,7 @@ "system": "Système" } }, - "users_privileges_note": "Le groupe d'utilisateurs est en cours de développement. L'utilisateur ne pourra pas gérer l'instance via l'interface. Nous vérifions les entrées de l'interface de gestion pour assurer que les accès soient limités aux administrateurs." + "users_privileges_note": "La fonctionnalité de groupe d'utilisateurs est en cours de développement. L'utilisateur ne pourra pas gérer l'instance via l'interface. Nous vérifions toujours tous les points terminaisons d'API pour assurer que les accès soient limités aux administrateurs." }, "zha": { "add_device_page": { @@ -2055,7 +2082,7 @@ "clusters": { "header": "Clusters", "help_cluster_dropdown": "Sélectionnez un cluster pour afficher les attributs et les commandes.", - "introduction": "Les clusters sont les blocs de construction de la fonctionnalité Zigbee. Ils séparent les fonctionnalités en unités logiques. Il existe des types de clients et de serveurs qui sont composés d'attributs et de commandes." + "introduction": "Les grappes sont les éléments de construction de la fonctionnalité Zigbee. Ils séparent les fonctionnalités en unités logiques. Il en existe de type clients et serveurs qui sont composés d'attributs et de commandes." }, "common": { "add_devices": "Ajouter des appareils", @@ -2549,7 +2576,11 @@ } }, "cardpicker": { + "by_card": "Par carte", + "by_entity": "Par entité", "custom_card": "Personnalisé", + "domain": "Domaine", + "entity": "Entité", "no_description": "Aucune description disponible." }, "edit_card": { @@ -2563,6 +2594,7 @@ "options": "Plus d'options", "pick_card": "Quelle carte aimeriez-vous ajouter ?", "pick_card_view_title": "Quelle carte souhaitez-vous ajouter à votre vue {name} ?", + "search_cards": "Rechercher des cartes", "show_code_editor": "Afficher l'éditeur de code", "show_visual_editor": "Afficher l'éditeur visuel", "toggle_editor": "Permuter l’éditeur", diff --git a/translations/frontend/pt.json b/translations/frontend/pt.json index f34d128cfd..96cf3681a2 100644 --- a/translations/frontend/pt.json +++ b/translations/frontend/pt.json @@ -419,7 +419,7 @@ "unlock": "Desbloquear" }, "media_player": { - "browse_media": "Pesquisar mídia", + "browse_media": "Pesquisar media", "media_next_track": "Próximo", "media_play": "Reproduzir", "media_play_pause": "Reproduzir/pausar", @@ -505,6 +505,7 @@ "back": "Retroceder", "cancel": "Cancelar", "close": "Fechar", + "continue": "Continuar", "delete": "Apagar", "error_required": "Obrigatório", "loading": "A carregar", @@ -562,6 +563,8 @@ "no_history_found": "Nenhum histórico de estado encontrado." }, "media-browser": { + "audio_not_supported": "O seu navegador não suporta o elemento de áudio.", + "choose_player": "Escolha o Leitor", "choose-source": "Escolha a fonte", "content-type": { "album": "Álbum", @@ -570,12 +573,15 @@ "playlist": "Lista de reprodução", "server": "Servidor" }, + "media_player": "Leitor multimédia", "media-player-browser": "Navegador do Media Player", "no_items": "Sem itens", "pick": "Escolher", - "pick-media": "Escolha a mídia", + "pick-media": "Escolha a média", "play": "Reproduzir", - "play-media": "Reproduzir Mídia" + "play-media": "Reproduzir Média", + "video_not_supported": "O seu navegador não suporta o elemento de vídeo.", + "web-browser": "Navegador web" }, "picture-upload": { "label": "Imagem", @@ -600,7 +606,7 @@ "second": "{count} {count, plural,\n one {segundo}\n other {segundos}\n}", "week": "{count} {count, plural,\n one {semana}\n other {semanas}\n}" }, - "future": "À {time}", + "future": "Há {time}", "just_now": "Agora mesmo", "never": "Nunca", "past": "{time} atrás" @@ -690,6 +696,7 @@ "more_info_control": { "dismiss": "Descartar diálogo", "edit": "Editar entidade", + "history": "Histórico", "person": { "create_zone": "Criar zona a partir da localização atual" }, @@ -851,7 +858,7 @@ }, "automation": { "caption": "Automação", - "description": "Criar e editar automações", + "description": "Gerir Automações", "editor": { "actions": { "add": "Adicionar ação", @@ -1357,7 +1364,7 @@ "caption": "Dispositivos", "confirm_delete": "Tem a certeza que quer apagar este dispositivo?", "confirm_rename_entity_ids": "Deseja também renomear os id's de entidade de suas entidades?", - "confirm_rename_entity_ids_warning": "Isso não mudará nenhuma configuração (como automações, scripts, cenas, Lovelace) que está usando essas entidades, você mesmo terá que atualizá-las.", + "confirm_rename_entity_ids_warning": "Tal não altera nenhuma configuração (como automações, scripts, cenas, Lovelace) que esteja a usar essas entidades, terá que atualizá-las por si.", "data_table": { "area": "Área", "battery": "Bateria", @@ -1720,9 +1727,15 @@ }, "network": { "header": "Gestão de Rede", - "introduction": "Gerenciar funções em toda a rede.", + "introduction": "Gerir funções de rede.", "node_count": "{count} nós" }, + "nodes_table": { + "id": "ID", + "manufacturer": "Fabricante", + "model": "Modelo", + "zwave_plus": "Z-Wave Plus" + }, "refresh_node": { "node_status": "Estado do Nó", "refreshing_description": "A atualizar as informações do nó ...", @@ -1733,7 +1746,7 @@ }, "select_instance": { "header": "Selecione uma instância OpenZWave", - "introduction": "Você tem mais de uma instância OpenZWave em execução. Qual instância você gostaria de gerenciar?" + "introduction": "Tem mais do que uma instância Openzwave em execução. Que instância deseja gerir?" }, "services": { "add_node": "Adicionar nó", @@ -1880,9 +1893,11 @@ "input_text": "Recarregar input texts", "introduction": "Algumas partes do Home Assistant podem ser recarregadas sem a necessidade de reiniciar. Ao carregar em Recarregar a configuração irá descartar a configuração atual e carregar a nova.", "min_max": "Recarregar entidades Mín. / Máx.", + "mqtt": "Recarregar entidades mqtt", "person": "Recarregar pessoas", "ping": "Recarregar entidades de sensor binárias de ping", - "rest": "Recarregar entidades REST", + "reload": "Recarregar {domain}", + "rest": "Recarregar as restantes entidades e notificar serviços", "scene": "Recarregar cenas", "script": "Recarregar scripts", "statistics": "Recarregar entidades estatísticas", @@ -2011,7 +2026,7 @@ "clusters": { "header": "Clusters", "help_cluster_dropdown": "Selecione um cluster para visualizar atributos e comandos.", - "introduction": "Clusters são os blocos de construção para a funcionalidade Zigbee. Eles separam a funcionalidade em unidades lógicas. Existem tipos de cliente e servidor e que são compostos de atributos e comandos." + "introduction": "Os Clusters são os blocos de construção da funcionalidade Zigbee. Eles separam a funcionalidade em unidades lógicas. Existem do tipo cliente e servidor e são compostos de atributos e comandos." }, "common": { "add_devices": "Adicionar dispositivos", @@ -2505,7 +2520,11 @@ } }, "cardpicker": { + "by_card": "Pelo Cartão", + "by_entity": "Pela Entidade", "custom_card": "Personalizado", + "domain": "Domínio", + "entity": "Entidade", "no_description": "Não há descrição disponível." }, "edit_card": { @@ -2519,6 +2538,7 @@ "options": "Mais opções", "pick_card": "Que cartão gostaria de adicionar?", "pick_card_view_title": "Que cartão você gostaria de adicionar à sua vista {name}?", + "search_cards": "Procurar cartões", "show_code_editor": "Mostrar Editor de Código", "show_visual_editor": "Mostrar Editor Visual", "toggle_editor": "Alternar Editor", @@ -2606,7 +2626,7 @@ }, "menu": { "close": "Fechar", - "configure_ui": "Configurar UI", + "configure_ui": "Configurar Painel", "exit_edit_mode": "Sair do modo de edição do IU", "help": "Ajuda", "refresh": "Atualizar", diff --git a/translations/frontend/ru.json b/translations/frontend/ru.json index 110d802140..1ecc5c2e62 100644 --- a/translations/frontend/ru.json +++ b/translations/frontend/ru.json @@ -563,6 +563,7 @@ "no_history_found": "История не найдена." }, "media-browser": { + "choose_player": "Выберите медиаплеер", "choose-source": "Выбрать источник", "content-type": { "album": "Альбом", @@ -571,12 +572,14 @@ "playlist": "Плейлист", "server": "Сервер" }, + "media_player": "Медиаплеер", "media-player-browser": "Браузер медиаплеера", "no_items": "Нет элементов", "pick": "Выбрать", "pick-media": "Выбрать Медиа", "play": "Воспроизведение", - "play-media": "Воспроизведение Медиа" + "play-media": "Воспроизведение Медиа", + "web-browser": "Веб-браузер" }, "picture-upload": { "label": "Изображение", @@ -618,7 +621,7 @@ "update": "Обновить" }, "domain_toggler": { - "reset_entities": "Сбросить объекты", + "reset_entities": "Сбросить настройки доступа объектов", "title": "Переключить домены" }, "entity_registry": { @@ -1204,11 +1207,15 @@ }, "alexa": { "banner": "Редактирование списка доступных объектов через пользовательский интерфейс отключено, так как Вы уже настроили фильтры в файле configuration.yaml.", + "dont_expose_entity": "Закрыть доступ", "expose": "Предоставить доступ", - "expose_entity": "Предоставить доступ к объекту", - "exposed_entities": "Объекты, к которым предоставлен доступ", + "expose_entity": "Открыть доступ", + "exposed": "Всего: {selected}", + "exposed_entities": "Объекты, к которым открыт доступ", + "follow_domain": "По домену", "manage_domains": "Управление доменами", - "not_exposed_entities": "Объекты, к которым не предоставлен доступ", + "not_exposed": "Всего: {selected}", + "not_exposed_entities": "Объекты, к которым закрыт доступ", "title": "Alexa" }, "caption": "Home Assistant Cloud", @@ -1245,9 +1252,15 @@ "google": { "banner": "Редактирование списка доступных объектов через пользовательский интерфейс отключено, так как Вы уже настроили фильтры в файле configuration.yaml.", "disable_2FA": "Отключить двухфакторную аутентификацию", + "dont_expose_entity": "Закрыть доступ", "expose": "Предоставить доступ", - "exposed_entities": "Объекты, к которым предоставлен доступ", - "not_exposed_entities": "Объекты, к которым не предоставлен доступ", + "expose_entity": "Открыть доступ", + "exposed": "Всего: {selected}", + "exposed_entities": "Объекты, к которым открыт доступ", + "follow_domain": "По домену", + "manage_domains": "Управление доменами", + "not_exposed": "Всего: {selected}", + "not_exposed_entities": "Объекты, к которым закрыт доступ", "sync_to_google": "Синхронизация изменений с Google.", "title": "Google Assistant" }, @@ -1755,8 +1768,21 @@ "versions": "Получение информации о версиях прошивки и классов команд", "wakeup": "Настройка поддержки очередей пробуждения и сообщений" }, + "node": { + "button": "Подробности об узле", + "not_found": "Узел не найден" + }, + "nodes_table": { + "failed": "Сбой", + "id": "ID", + "manufacturer": "Производитель", + "model": "Модель", + "query_stage": "Стадия запроса", + "zwave_plus": "Z-Wave Plus" + }, "refresh_node": { "battery_note": "Если узел работает от батареи, обязательно разбудите его, прежде чем продолжить", + "button": "Обновить узел", "complete": "Обновление узла завершено", "description": "Повторный опрос узла и обновление классов команд, возможностей и значений узла.", "node_status": "Статус узла", @@ -2015,7 +2041,7 @@ "system": "Системный" } }, - "users_privileges_note": "Группа пользователей находится в стадии разработки. В дальнейшем пользователи не смогут администрировать сервер через пользовательский интерфейс. Мы все еще проверяем все конечные точки API управления, чтобы убедиться, что они правильно ограничивают доступ." + "users_privileges_note": "Функционал пользователей всё ещё в стадии разработки. В дальнейшем пользователи не смогут администрировать сервер через пользовательский интерфейс. Мы все еще проверяем все конечные точки API управления, чтобы убедиться, что они правильно ограничивают доступ." }, "zha": { "add_device_page": { @@ -2565,6 +2591,7 @@ "options": "Больше параметров", "pick_card": "Какую карточку Вы хотели бы добавить?", "pick_card_view_title": "Какую карточку Вы хотели бы добавить на вкладку {name}?", + "search_cards": "Поиск карточек", "show_code_editor": "Текстовый редактор", "show_visual_editor": "Форма ввода", "toggle_editor": "Переключить редактор", diff --git a/translations/frontend/zh-Hans.json b/translations/frontend/zh-Hans.json index 1e7b9bfa0a..525efe5654 100644 --- a/translations/frontend/zh-Hans.json +++ b/translations/frontend/zh-Hans.json @@ -563,6 +563,8 @@ "no_history_found": "没有找到历史状态。" }, "media-browser": { + "audio_not_supported": "您的浏览器不支持音频元素。", + "choose_player": "选择播放器", "choose-source": "选择媒体源", "content-type": { "album": "专辑", @@ -571,12 +573,16 @@ "playlist": "播放列表", "server": "服务器" }, + "media_not_supported": "浏览器媒体播放器不支持此类型的媒体", + "media_player": "媒体播放器", "media-player-browser": "媒体播放浏览器", "no_items": "没有项目", "pick": "选定", "pick-media": "选定媒体", "play": "播放", - "play-media": "播放媒体" + "play-media": "播放媒体", + "video_not_supported": "您的浏览器不支持视频元素。", + "web-browser": "网页浏览器" }, "picture-upload": { "label": "图片", @@ -1765,8 +1771,21 @@ "versions": "正在获取固件和命令类版本信息", "wakeup": "正在设置对唤醒队列和消息的支持" }, + "node": { + "button": "节点详细信息", + "not_found": "节点未找到" + }, + "nodes_table": { + "failed": "故障", + "id": "ID", + "manufacturer": "制造商", + "model": "型号", + "query_stage": "查询阶段", + "zwave_plus": "Z-Wave Plus" + }, "refresh_node": { "battery_note": "如果节点由电池供电,请确保在继续操作之前将其唤醒", + "button": "刷新节点", "complete": "节点刷新完成", "description": "这将通知 OpenZWave 重新访问节点并更新节点的命令类、功能和值。", "node_status": "节点状态", @@ -2575,6 +2594,7 @@ "options": "更多选项", "pick_card": "请选择要添加的卡片。", "pick_card_view_title": "您想将哪张卡片添加到 {name} 视图?", + "search_cards": "搜索卡片", "show_code_editor": "显示代码编辑器", "show_visual_editor": "显示可视化编辑器", "toggle_editor": "切换编辑器", diff --git a/translations/frontend/zh-Hant.json b/translations/frontend/zh-Hant.json index 025a931264..fd857908ae 100644 --- a/translations/frontend/zh-Hant.json +++ b/translations/frontend/zh-Hant.json @@ -563,6 +563,8 @@ "no_history_found": "找不到狀態歷史。" }, "media-browser": { + "audio_not_supported": "瀏覽器不支援音效元件。", + "choose_player": "選擇播放器", "choose-source": "選擇來源", "content-type": { "album": "專輯", @@ -571,12 +573,16 @@ "playlist": "播放列表", "server": "伺服器" }, + "media_not_supported": "瀏覽器媒體播放器不支援此類型媒體", + "media_player": "媒體播放器", "media-player-browser": "媒體播放器瀏覽器", "no_items": "沒有項目", "pick": "選擇", "pick-media": "選擇媒體", "play": "播放", - "play-media": "播放媒體" + "play-media": "播放媒體", + "video_not_supported": "瀏覽器不支援影片元件。", + "web-browser": "網頁瀏覽器" }, "picture-upload": { "label": "照片", @@ -1765,8 +1771,21 @@ "versions": "獲得韌體與命令 Class 版本資訊", "wakeup": "設定喚醒序列與訊息之支援" }, + "node": { + "button": "節點詳細資訊", + "not_found": "找不到節點" + }, + "nodes_table": { + "failed": "失敗", + "id": "ID", + "manufacturer": "廠牌", + "model": "型號", + "query_stage": "查詢階段", + "zwave_plus": "Z-Wave Plus" + }, "refresh_node": { "battery_note": "假如節點為電池供電、請確定先行喚醒以繼續", + "button": "更新節點", "complete": "節點更新完成", "description": "將會通知 OpenZWave 重新探訪節點並更新節點命令 Class、相容性與數值。", "node_status": "節點狀態", @@ -2025,7 +2044,7 @@ "system": "系統" } }, - "users_privileges_note": "使用者群組功能進行中。將無法透過 UI 進行使用者管理,仍在檢視所有管理 API Endpoint 以確保能夠正確符合管理員存取需求。" + "users_privileges_note": "使用者群組功能仍在開發中。將無法透過 UI 進行使用者管理,仍在檢視所有管理 API Endpoint 以確保能夠正確符合管理員存取需求。" }, "zha": { "add_device_page": { @@ -2575,6 +2594,7 @@ "options": "更多選項", "pick_card": "選擇所要新增的面板?", "pick_card_view_title": "要加入 {name} 視圖的面板?", + "search_cards": "搜尋面板", "show_code_editor": "顯示編碼編輯器", "show_visual_editor": "顯示視覺編輯器", "toggle_editor": "切換編輯器", From bd66bd6cf088a2c6a7f389202d7e680289dd332b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20S=C3=B8rensen?= Date: Sun, 6 Sep 2020 18:29:22 +0200 Subject: [PATCH 06/23] Add color to hass-error-screen (#6803) --- src/layouts/hass-error-screen.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/layouts/hass-error-screen.ts b/src/layouts/hass-error-screen.ts index eab453b29e..8776184498 100644 --- a/src/layouts/hass-error-screen.ts +++ b/src/layouts/hass-error-screen.ts @@ -63,6 +63,7 @@ class HassErrorScreen extends LitElement { pointer-events: auto; } .content { + color: var(--primary-text-color); height: calc(100% - 64px); display: flex; align-items: center; From 76f59d99a22d085dcbdf9758963bea2283db7165 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20S=C3=B8rensen?= Date: Sun, 6 Sep 2020 18:29:39 +0200 Subject: [PATCH 07/23] Remove extra > from button (#6804) --- hassio/src/addon-view/config/hassio-addon-network.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hassio/src/addon-view/config/hassio-addon-network.ts b/hassio/src/addon-view/config/hassio-addon-network.ts index d90a68ffd3..99f871be99 100644 --- a/hassio/src/addon-view/config/hassio-addon-network.ts +++ b/hassio/src/addon-view/config/hassio-addon-network.ts @@ -88,8 +88,8 @@ class HassioAddonNetwork extends LitElement {
- Reset to defaults > + Reset to defaults + Save From 9aa8175e23eb33cb1d8ce720128b0f7fcaed8093 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Sun, 6 Sep 2020 19:59:29 +0200 Subject: [PATCH 08/23] Update ha-logbook.ts --- src/panels/logbook/ha-logbook.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/panels/logbook/ha-logbook.ts b/src/panels/logbook/ha-logbook.ts index 5bf0f92acf..1270db9619 100644 --- a/src/panels/logbook/ha-logbook.ts +++ b/src/panels/logbook/ha-logbook.ts @@ -216,7 +216,7 @@ class HaLogbook extends LitElement { display: flex; justify-content: center; flex-direction: column; - width: 65px; + width: 70px; flex-shrink: 0; font-size: 12px; color: var(--secondary-text-color); From 509481ef06029178412b25cf979d5250ddd01a31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20S=C3=B8rensen?= Date: Sun, 6 Sep 2020 20:29:02 +0200 Subject: [PATCH 09/23] Ignore more proxy disconnect codes (#6805) Co-authored-by: Bram Kragten --- hassio/src/dashboard/hassio-update.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hassio/src/dashboard/hassio-update.ts b/hassio/src/dashboard/hassio-update.ts index 3bb15444ed..9bb6cc73ec 100644 --- a/hassio/src/dashboard/hassio-update.ts +++ b/hassio/src/dashboard/hassio-update.ts @@ -164,8 +164,9 @@ export class HassioUpdate extends LitElement { try { await this.hass.callApi>("POST", item.apiPath); } catch (err) { - // Only show an error if the status code was not 504, or no status at all (connection terminated) - if (err.status_code && err.status_code !== 504) { + // Only show an error if the status code was not expected (user behind proxy) + // or no status at all(connection terminated) + if (err.status_code && ![502, 503, 504].includes(err.status_code)) { showAlertDialog(this, { title: "Update failed", text: extractApiErrorMessage(err), From cfa0c452132847b8488cdc0f91403be4703fecf3 Mon Sep 17 00:00:00 2001 From: Philip Allgaier Date: Sun, 6 Sep 2020 22:17:34 +0200 Subject: [PATCH 10/23] Fix media browser panel title + selection header color (#6807) --- .../hui-dialog-select-media-player.ts | 22 +++++++----- .../hui-dialog-web-browser-play-media.ts | 36 +++++++++---------- src/translations/en.json | 1 + 3 files changed, 32 insertions(+), 27 deletions(-) diff --git a/src/panels/media-browser/hui-dialog-select-media-player.ts b/src/panels/media-browser/hui-dialog-select-media-player.ts index bacce8505e..0c45026e81 100644 --- a/src/panels/media-browser/hui-dialog-select-media-player.ts +++ b/src/panels/media-browser/hui-dialog-select-media-player.ts @@ -13,6 +13,7 @@ import { fireEvent } from "../../common/dom/fire_event"; import { createCloseHeading } from "../../components/ha-dialog"; import { BROWSER_SOURCE } from "../../data/media-player"; import type { HomeAssistant } from "../../types"; +import { haStyleDialog } from "../../resources/styles"; import type { SelectMediaPlayerDialogParams } from "./show-select-media-source-dialog"; @customElement("hui-dialog-select-media-player") @@ -74,15 +75,18 @@ export class HuiDialogSelectMediaPlayer extends LitElement { this.closeDialog(); } - static get styles(): CSSResult { - return css` - ha-dialog { - --dialog-content-padding: 0 24px 20px; - } - paper-item { - cursor: pointer; - } - `; + static get styles(): CSSResult[] { + return [ + haStyleDialog, + css` + ha-dialog { + --dialog-content-padding: 0 24px 20px; + } + paper-item { + cursor: pointer; + } + `, + ]; } } diff --git a/src/panels/media-browser/hui-dialog-web-browser-play-media.ts b/src/panels/media-browser/hui-dialog-web-browser-play-media.ts index 05fbea66d6..d528bec1e4 100644 --- a/src/panels/media-browser/hui-dialog-web-browser-play-media.ts +++ b/src/panels/media-browser/hui-dialog-web-browser-play-media.ts @@ -11,6 +11,7 @@ import { fireEvent } from "../../common/dom/fire_event"; import { createCloseHeading } from "../../components/ha-dialog"; import "../../components/ha-hls-player"; import type { HomeAssistant } from "../../types"; +import { haStyleDialog } from "../../resources/styles"; import { WebBrowserPlayMediaDialogParams } from "./show-media-player-dialog"; @customElement("hui-dialog-web-browser-play-media") @@ -92,26 +93,25 @@ export class HuiDialogWebBrowserPlayMedia extends LitElement { `; } - static get styles(): CSSResult { - return css` - ha-dialog { - --mdc-dialog-heading-ink-color: var(--primary-text-color); - } - - @media (min-width: 800px) { - ha-dialog { - --mdc-dialog-max-width: 800px; - --mdc-dialog-min-width: 400px; + static get styles(): CSSResult[] { + return [ + haStyleDialog, + css` + @media (min-width: 800px) { + ha-dialog { + --mdc-dialog-max-width: 800px; + --mdc-dialog-min-width: 400px; + } } - } - video, - audio, - img { - outline: none; - width: 100%; - } - `; + video, + audio, + img { + outline: none; + width: 100%; + } + `, + ]; } } diff --git a/src/translations/en.json b/src/translations/en.json index 8e4ced5344..436dd97a9e 100755 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -9,6 +9,7 @@ "mailbox": "Mailbox", "shopping_list": "Shopping list", "developer_tools": "Developer Tools", + "media_browser": "Media Browser", "profile": "Profile" }, "state": { From a37aad18b773e41d859e8f5645e7b6beb8e97d1d Mon Sep 17 00:00:00 2001 From: Sean Mooney Date: Sun, 6 Sep 2020 17:53:00 -0400 Subject: [PATCH 11/23] Minor typo fix (#6809) Unkown = Unknown --- src/data/hassio/common.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/data/hassio/common.ts b/src/data/hassio/common.ts index b3681d72a8..4ab432b855 100644 --- a/src/data/hassio/common.ts +++ b/src/data/hassio/common.ts @@ -9,7 +9,7 @@ export const hassioApiResultExtractor = (response: HassioResponse) => export const extractApiErrorMessage = (error: any): string => { return typeof error === "object" ? typeof error.body === "object" - ? error.body.message || "Unkown error, see logs" - : error.body || "Unkown error, see logs" + ? error.body.message || "Unknown error, see logs" + : error.body || "Unknown error, see logs" : error; }; From efe8eca4e39ead38cff7ec53d4f2cd4985e292ff Mon Sep 17 00:00:00 2001 From: Zack Barett Date: Sun, 6 Sep 2020 18:28:15 -0500 Subject: [PATCH 12/23] Media browser updates (#6801) --- src/components/ha-dialog.ts | 1 + .../dialog-media-player-browse.ts | 5 +- .../media-player/ha-media-player-browse.ts | 86 +++++++++++++------ src/translations/en.json | 1 + 4 files changed, 65 insertions(+), 28 deletions(-) diff --git a/src/components/ha-dialog.ts b/src/components/ha-dialog.ts index 4459efb5b3..8c34add0e3 100644 --- a/src/components/ha-dialog.ts +++ b/src/components/ha-dialog.ts @@ -64,6 +64,7 @@ export class HaDialog extends MwcDialog { } .mdc-dialog .mdc-dialog__surface { position: var(--dialog-surface-position, relative); + top: var(--dialog-surface-top); min-height: var(--mdc-dialog-min-height, auto); } :host([flexContent]) .mdc-dialog .mdc-dialog__content { diff --git a/src/components/media-player/dialog-media-player-browse.ts b/src/components/media-player/dialog-media-player-browse.ts index 9f0c07436f..311536844f 100644 --- a/src/components/media-player/dialog-media-player-browse.ts +++ b/src/components/media-player/dialog-media-player-browse.ts @@ -43,7 +43,7 @@ class DialogMediaPlayerBrowse extends LitElement { public closeDialog() { this._params = undefined; - fireEvent(this, "dialog-closed", {dialog: this.localName}); + fireEvent(this, "dialog-closed", { dialog: this.localName }); } protected render(): TemplateResult { @@ -93,6 +93,9 @@ class DialogMediaPlayerBrowse extends LitElement { @media (min-width: 800px) { ha-dialog { --mdc-dialog-max-width: 800px; + --dialog-surface-position: fixed; + --dialog-surface-top: 40px; + --mdc-dialog-max-height: calc(100% - 72px); } ha-media-player-browse { width: 700px; diff --git a/src/components/media-player/ha-media-player-browse.ts b/src/components/media-player/ha-media-player-browse.ts index 5b3d637812..df10572558 100644 --- a/src/components/media-player/ha-media-player-browse.ts +++ b/src/components/media-player/ha-media-player-browse.ts @@ -18,8 +18,10 @@ import { } from "lit-element"; import { classMap } from "lit-html/directives/class-map"; import { ifDefined } from "lit-html/directives/if-defined"; +import { styleMap } from "lit-html/directives/style-map"; import memoizeOne from "memoize-one"; import { fireEvent } from "../../common/dom/fire_event"; +import { compare } from "../../common/string/compare"; import { computeRTLDirection } from "../../common/util/compute_rtl"; import { debounce } from "../../common/util/debounce"; import { @@ -30,6 +32,7 @@ import { MediaPlayerBrowseAction, } from "../../data/media-player"; import type { MediaPlayerItem } from "../../data/media-player"; +import { showAlertDialog } from "../../dialogs/generic/show-dialog-box"; import { installResizeObserver } from "../../panels/lovelace/common/install-resize-observer"; import { haStyle } from "../../resources/styles"; import type { HomeAssistant } from "../../types"; @@ -130,7 +133,11 @@ export class HaMediaPlayerBrowse extends LitElement { ? html`
${this._narrow && currentItem?.can_play ? html` @@ -218,12 +225,16 @@ export class HaMediaPlayerBrowse extends LitElement {
${child.can_expand && !child.thumbnail ? html` @@ -333,6 +344,10 @@ export class HaMediaPlayerBrowse extends LitElement { this._fetchData(this.mediaContentId, this.mediaContentType).then( (itemData) => { + if (!itemData) { + return; + } + this._mediaPlayerItems = [itemData]; } ); @@ -349,13 +364,19 @@ export class HaMediaPlayerBrowse extends LitElement { fireEvent(this, "media-picked", { item }); } - private async _navigateForward(ev: MouseEvent): Promise { + private async _childClicked(ev: MouseEvent): Promise { const target = ev.currentTarget as any; const item: MediaPlayerItem = target.item; if (!item) { return; } + + if (!item.can_expand) { + this._runAction(item); + return; + } + this._navigate(item); } @@ -365,6 +386,10 @@ export class HaMediaPlayerBrowse extends LitElement { item.media_content_type ); + if (!itemData) { + return; + } + this.scrollTo(0, 0); this._mediaPlayerItems = [...this._mediaPlayerItems, itemData]; } @@ -372,16 +397,33 @@ export class HaMediaPlayerBrowse extends LitElement { private async _fetchData( mediaContentId?: string, mediaContentType?: string - ): Promise { - const itemData = - this.entityId !== BROWSER_SOURCE - ? await browseMediaPlayer( - this.hass, - this.entityId, - mediaContentId, - mediaContentType - ) - : await browseLocalMediaPlayer(this.hass, mediaContentId); + ): Promise { + let itemData: MediaPlayerItem | undefined; + try { + itemData = + this.entityId !== BROWSER_SOURCE + ? await browseMediaPlayer( + this.hass, + this.entityId, + mediaContentId, + mediaContentType + ) + : await browseLocalMediaPlayer(this.hass, mediaContentId); + itemData.children = itemData.children?.sort((first, second) => + !first.can_expand && second.can_expand + ? 1 + : first.can_expand && !second.can_expand + ? -1 + : compare(first.title, second.title) + ); + } catch (error) { + showAlertDialog(this, { + title: this.hass.localize( + "ui.components.media-browser.media_browsing_error" + ), + text: error.message, + }); + } return itemData; } @@ -435,12 +477,6 @@ export class HaMediaPlayerBrowse extends LitElement { border-bottom: 1px solid var(--divider-color); } - .header_button { - position: relative; - top: 14px; - right: -8px; - } - .header { background-color: var(--card-background-color); position: sticky; @@ -539,9 +575,6 @@ export class HaMediaPlayerBrowse extends LitElement { ); grid-gap: 16px; margin: 8px 0px; - } - - :host(:not([narrow])) .children { padding: 0px 24px; } @@ -683,8 +716,7 @@ export class HaMediaPlayerBrowse extends LitElement { padding: 20px 24px 10px; } - :host([narrow]) .media-source, - :host([narrow]) .children { + :host([narrow]) .media-source { padding: 0 24px; } @@ -703,8 +735,8 @@ export class HaMediaPlayerBrowse extends LitElement { -webkit-line-clamp: 1; } - :host(:not([narrow])[scroll]) .header-info { - height: 75px; + :host(:not([narrow])[scroll]) .header:not(.no-img) mwc-icon-button { + align-self: center; } :host([scroll]) .header-info mwc-button, diff --git a/src/translations/en.json b/src/translations/en.json index 436dd97a9e..cd234428f5 100755 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -365,6 +365,7 @@ "audio_not_supported": "Your browser does not support the audio element.", "video_not_supported": "Your browser does not support the video element.", "media_not_supported": "The Browser Media Player does not support this type of media", + "media_browsing_error": "Media Browsing Error", "content-type": { "server": "Server", "library": "Library", From c73330a466689e52dda643195ca7d22d9e4d8caf Mon Sep 17 00:00:00 2001 From: HomeAssistant Azure Date: Mon, 7 Sep 2020 00:32:51 +0000 Subject: [PATCH 13/23] [ci skip] Translation update --- translations/frontend/cs.json | 1 + translations/frontend/en.json | 2 ++ translations/frontend/fr.json | 24 +++++++++---------- translations/frontend/pl.json | 37 ++++++++++++++++++++++++++++-- translations/frontend/pt.json | 6 +++++ translations/frontend/ru.json | 5 ++-- translations/frontend/sk.json | 21 +++++++++++++++++ translations/frontend/zh-Hant.json | 1 + 8 files changed, 81 insertions(+), 16 deletions(-) diff --git a/translations/frontend/cs.json b/translations/frontend/cs.json index b8ec36694b..cea97f6d86 100644 --- a/translations/frontend/cs.json +++ b/translations/frontend/cs.json @@ -1552,6 +1552,7 @@ "reload_restart_confirm": "Restartujte Home Assistant pro nové načtení této integrace", "rename": "Přejmenovat", "restart_confirm": "Restartujte Home Assistant pro odstranění této integrace", + "services": "{count} {count, plural,\n one {služba}\n few {služby}\n other {služeb}\n}", "settings_button": "Upravit nastavení pro {integration}", "system_options": "Více možností", "system_options_button": "Upravit nastavení pro {integration}", diff --git a/translations/frontend/en.json b/translations/frontend/en.json index e320c6c31e..2eac397f6b 100644 --- a/translations/frontend/en.json +++ b/translations/frontend/en.json @@ -19,6 +19,7 @@ "logbook": "Logbook", "mailbox": "Mailbox", "map": "Map", + "media_browser": "Media Browser", "profile": "Profile", "shopping_list": "Shopping list", "states": "Overview" @@ -573,6 +574,7 @@ "playlist": "Playlist", "server": "Server" }, + "media_browsing_error": "Media Browsing Error", "media_not_supported": "The Browser Media Player does not support this type of media", "media_player": "Media Player", "media-player-browser": "Media Player Browser", diff --git a/translations/frontend/fr.json b/translations/frontend/fr.json index 86646023b1..40a60cb610 100644 --- a/translations/frontend/fr.json +++ b/translations/frontend/fr.json @@ -79,7 +79,7 @@ "default": { "entity_not_found": "Entité introuvable", "error": "Erreur", - "unavailable": "Indisponible", + "unavailable": "Indispo.", "unknown": "Inconnu" }, "device_tracker": { @@ -170,7 +170,7 @@ "on": "Problème" }, "safety": { - "off": "Sécurisé", + "off": "Sûr", "on": "Dangereux" }, "smoke": { @@ -318,7 +318,7 @@ "fog": "Brouillard", "hail": "Grêle", "lightning": "Orage", - "lightning-rainy": "Orage / Pluie", + "lightning-rainy": "Orage / Pluvieux", "partlycloudy": "Partiellement nuageux", "pouring": "Averses", "rainy": "Pluvieux", @@ -351,7 +351,7 @@ "alarm_control_panel": { "arm_away": "Armer (absent)", "arm_custom_bypass": "Bypass personnalisé", - "arm_home": "Armer (domicile)", + "arm_home": "Armer (présent)", "arm_night": "Armer nuit", "clear_code": "Effacer", "code": "Code", @@ -1451,7 +1451,7 @@ "name": "Nom", "status": "Statut" }, - "introduction": "Home Assistant tient un registre de chaque entité qu'il a déjà vu au moins une fois et qui peut être identifié de manière unique. Chacune de ces entités se verra attribuer un identifiant qui sera réservé à cette seule entité.", + "introduction": "Home Assistant tient un registre de chaque entité qu'il a déjà vu au moins une fois et qui peut être identifiée de manière unique. Chacune de ces entités se verra attribuer un identifiant qui sera réservé à cette seule entité.", "introduction2": "Utilisé le registre des entités pour remplacer le nom, modifier l'ID de l'entité ou supprimer l'entrée de Home Assistant.", "remove_selected": { "button": "Supprimer la sélection", @@ -1543,7 +1543,7 @@ "firmware": "Firmware: {version}", "hub": "Connecté via", "manuf": "par {manufacturer}", - "no_area": "Pas de pièce", + "no_area": "Pas de zone", "no_device": "Entités sans appareils", "no_devices": "Cette intégration n'a pas d'appareils.", "options": "Options", @@ -1749,7 +1749,7 @@ }, "network": { "header": "Gestion du réseau", - "introduction": "Διαχείρηση λειτουργιών δικτύου", + "introduction": "Gérez les fonctions de niveau réseau.", "node_count": "{count} nœuds" }, "node_query_stages": { @@ -1934,7 +1934,7 @@ "filter": "Recharger les entités de filtre", "generic": "Recharger les entités de caméra IP générique", "generic_thermostat": "Recharger les entités de thermostat générique", - "group": "Recharger les groupes", + "group": "Recharger les groupes, les entités de groupe et notifier les services", "heading": "Rechargement de la configuration", "history_stats": "Recharger les entités des statistiques historiques", "homekit": "Recharger HomeKit", @@ -2082,7 +2082,7 @@ "clusters": { "header": "Clusters", "help_cluster_dropdown": "Sélectionnez un cluster pour afficher les attributs et les commandes.", - "introduction": "Les grappes sont les éléments de construction de la fonctionnalité Zigbee. Ils séparent les fonctionnalités en unités logiques. Il en existe de type clients et serveurs qui sont composés d'attributs et de commandes." + "introduction": "Les grappes sont les éléments de construction de la fonctionnalité Zigbee. Ils séparent les fonctionnalités en unités logiques. Il en existe de types client et serveur et sont composés d'attributs et de commandes." }, "common": { "add_devices": "Ajouter des appareils", @@ -2523,7 +2523,7 @@ }, "markdown": { "content": "Contenu", - "description": "La carte Markdown est utilisée pour afficher du Markdown.", + "description": "La carte Markdown est utilisée pour le rendu du Markdown.", "name": "Markdown" }, "media-control": { @@ -2797,7 +2797,7 @@ "data": { "code": "Code d'authentification à deux facteurs" }, - "description": "Ouvrez le **{mfa_module_name}** sur votre appareil pour afficher votre code d'authentification à deux facteurs et vérifier votre identité:" + "description": "Ouvrez le ** {mfa_module_name} ** sur votre appareil pour afficher votre code d'authentification à deux facteurs et confirmer votre identité:" } } }, @@ -2817,7 +2817,7 @@ } }, "start_over": "Recommencer", - "unknown_error": "Quelque chose a mal tourné", + "unknown_error": "Un problème est survenu", "working": "Veuillez patienter" }, "initializing": "Initialisation", diff --git a/translations/frontend/pl.json b/translations/frontend/pl.json index 901952d6c0..cb96ebd163 100644 --- a/translations/frontend/pl.json +++ b/translations/frontend/pl.json @@ -505,6 +505,7 @@ "back": "Wstecz", "cancel": "Anuluj", "close": "Zamknij", + "continue": "Kontynuuj", "delete": "Usuń", "error_required": "To pole jest wymagane", "loading": "Ładowanie", @@ -562,6 +563,8 @@ "no_history_found": "Nie znaleziono historii." }, "media-browser": { + "audio_not_supported": "Twoja przeglądarka nie obsługuje elementu audio.", + "choose_player": "Wybierz odtwarzacz", "choose-source": "Wybierz źródło", "content-type": { "album": "Album", @@ -570,12 +573,16 @@ "playlist": "Lista odtwarzania", "server": "Serwer" }, + "media_not_supported": "Przeglądarka odtwarzacza mediów nie obsługuje tego typu mediów", + "media_player": "Odtwarzacz mediów", "media-player-browser": "Przeglądarka odtwarzacza mediów", "no_items": "Brak elementów", "pick": "Wybierz", "pick-media": "Wybierz media", "play": "Odtwarzaj", - "play-media": "Odtwarzaj media" + "play-media": "Odtwarzaj media", + "video_not_supported": "Twoja przeglądarka nie obsługuje elementu wideo.", + "web-browser": "Przeglądarka internetowa" }, "picture-upload": { "label": "Obraz", @@ -689,8 +696,10 @@ "crop": "Przytnij" }, "more_info_control": { + "controls": "Sterowanie", "dismiss": "Zamknij okno dialogowe", "edit": "Edytuj encję", + "history": "Historia", "person": { "create_zone": "Utwórz strefę z bieżącej lokalizacji" }, @@ -1543,6 +1552,7 @@ "reload_restart_confirm": "Uruchom ponownie Home Assistanta, aby dokończyć ponowne wczytywanie tej integracji", "rename": "Zmień nazwę", "restart_confirm": "Zrestartuj Home Assistanta, aby zakończyć usuwanie tej integracji", + "services": "{count} {count, plural,\n one {usługa}\n few {usługi}\n many {usług}\n other {usług}\n}", "settings_button": "Edytuj ustawienia dla {integration}", "system_options": "Opcje systemowe", "system_options_button": "Opcje systemowe dla {integration}", @@ -1746,7 +1756,7 @@ "node_query_stages": { "associations": "Odświeżanie grup skojarzeń i członkostwa", "cacheload": "Ładowanie informacji z pliku pamięci podręcznej OpenZWave. Węzły baterii pozostaną na tym etapie, dopóki węzeł się nie wybudzi.", - "complete": "Proces wywiadu jest zakończony", + "complete": "Proces odpytywania jest zakończony", "configuration": "Pobieranie wartości konfiguracyjnych z węzła", "dynamic": "Pobieranie często zmieniających się wartości z węzła", "instances": "Pobieranie szczegółowych informacji o instancjach lub kanałach obsługiwanych przez urządzenie", @@ -1762,8 +1772,21 @@ "versions": "Pobieranie informacji o wersjach oprogramowania i klas poleceń", "wakeup": "Konfigurowanie obsługi kolejek wybudzania i wiadomości" }, + "node": { + "button": "Szczegóły węzła", + "not_found": "Nie znaleziono węzła" + }, + "nodes_table": { + "failed": "Uszkodzony", + "id": "Identyfikator", + "manufacturer": "Producent", + "model": "Model", + "query_stage": "Etap odpytywania", + "zwave_plus": "Z-Wave Plus" + }, "refresh_node": { "battery_note": "Jeśli węzeł jest zasilany bateryjnie, przed kontynuowaniem należy go wybudzić", + "button": "Odśwież węzeł", "complete": "Odświeżanie węzła zakończone", "description": "Poinformuje to OpenZWave o konieczności ponownego odpytania węzła i zaktualizowaniu jego klas poleceń, możliwości i wartości.", "node_status": "Stan węzła", @@ -1923,12 +1946,17 @@ "input_text": "Pomocnicy typu tekst", "introduction": "Niektóre fragmenty konfiguracji można przeładować bez ponownego uruchamiania. Poniższe przyciski pozwalają na ponowne wczytanie danej części konfiguracji YAML.", "min_max": "Encje komponentu min/max", + "mqtt": "Encje komponentu MQTT", "person": "Osoby", "ping": "Encje komponentu ping", + "reload": "Domenę {domain}", "rest": "Encje komponentu rest", + "rpi_gpio": "Encje komponentu Raspberry Pi GPIO", "scene": "Sceny", "script": "Skrypty", + "smtp": "Usługi powiadomień komponentu SMTP", "statistics": "Encje komponentu statystyka", + "telegram": "Usługi powiadomień komponentu Telegram", "template": "Szablony encji", "trend": "Encje komponentu trend", "universal": "Encje komponentu uniwersalny odtwarzacz mediów", @@ -2549,7 +2577,11 @@ } }, "cardpicker": { + "by_card": "Według karty", + "by_entity": "Według encji", "custom_card": "Niestandardowa", + "domain": "Domena", + "entity": "Encja", "no_description": "Brak dostępnego opisu." }, "edit_card": { @@ -2563,6 +2595,7 @@ "options": "Więcej opcji", "pick_card": "Wybierz kartę, którą chcesz dodać.", "pick_card_view_title": "Którą kartę chcesz dodać do widoku {name}?", + "search_cards": "Szukaj kart", "show_code_editor": "Edytor kodu", "show_visual_editor": "Edytor wizualny", "toggle_editor": "Przełącz edytor", diff --git a/translations/frontend/pt.json b/translations/frontend/pt.json index 96cf3681a2..302d98036b 100644 --- a/translations/frontend/pt.json +++ b/translations/frontend/pt.json @@ -1730,13 +1730,19 @@ "introduction": "Gerir funções de rede.", "node_count": "{count} nós" }, + "node": { + "button": "Detalhes do nó", + "not_found": "Nó não encontrado" + }, "nodes_table": { + "failed": "Falhou", "id": "ID", "manufacturer": "Fabricante", "model": "Modelo", "zwave_plus": "Z-Wave Plus" }, "refresh_node": { + "button": "Atualizar nó", "node_status": "Estado do Nó", "refreshing_description": "A atualizar as informações do nó ...", "start_refresh_button": "Iniciar atualização", diff --git a/translations/frontend/ru.json b/translations/frontend/ru.json index 1ecc5c2e62..8bc907ffb4 100644 --- a/translations/frontend/ru.json +++ b/translations/frontend/ru.json @@ -1549,6 +1549,7 @@ "reload_restart_confirm": "Перезапустите Home Assistant, чтобы завершить перезагрузку этой интеграции", "rename": "Переименовать", "restart_confirm": "Перезапустите Home Assistant, чтобы завершить удаление этой интеграции", + "services": "{count} {count, plural,\n one {служба}\n other {служб}\n}", "settings_button": "Настройки интеграции {integration}", "system_options": "Настройки интеграции", "system_options_button": "Системные параметры интеграции {integration}", @@ -1595,7 +1596,7 @@ "none_found_detail": "Измените критерии поиска", "note_about_integrations": "Пока что не все интеграции могут быть настроены через пользовательский интерфейс.", "note_about_website_reference": "Все доступные интеграции Вы можете найти на ", - "rename_dialog": "Изменение названия интеграции", + "rename_dialog": "Название интеграции", "rename_input_label": "Название", "search": "Поиск интеграций" }, @@ -2877,7 +2878,7 @@ }, "integration": { "finish": "Готово", - "intro": "Устройства и сервисы представлены в Home Assistant как интеграции. Вы можете добавить их сейчас или сделать это позже в разделе настроек.", + "intro": "Устройства и службы представлены в Home Assistant как интеграции. Вы можете добавить их сейчас или сделать это позже в разделе настроек.", "more_integrations": "Ещё" }, "intro": "Готовы ли Вы разбудить свой дом, вернуть свою конфиденциальность и присоединиться к всемирному сообществу?", diff --git a/translations/frontend/sk.json b/translations/frontend/sk.json index 6e865645c7..9e3bacaab7 100644 --- a/translations/frontend/sk.json +++ b/translations/frontend/sk.json @@ -484,6 +484,7 @@ "back": "Späť", "cancel": "Zrušiť", "close": "Zavrieť", + "continue": "Pokračovať", "delete": "Odstrániť", "loading": "Načítava sa", "next": "Ďalej", @@ -533,6 +534,11 @@ "loading_history": "Načítavam históriu stavov", "no_history_found": "Nenašla sa žiadna história stavov" }, + "media-browser": { + "choose_player": "Vyberte prehrávač", + "media_player": "Prehrávač médií", + "web-browser": "Webový prehliadač" + }, "related-items": { "area": "Oblasť", "automation": "Súčasťou nasledujúcich automatizácií", @@ -635,6 +641,7 @@ "more_info_control": { "dismiss": "Zrušiť dialógové okno", "edit": "Upraviť entitu", + "history": "História", "person": { "create_zone": "Vytvoriť zónu z aktuálnej polohy" }, @@ -1534,6 +1541,11 @@ "title": "MQTT", "topic": "téma" }, + "ozw": { + "nodes_table": { + "id": "ID" + } + }, "person": { "add_person": "Pridať osobu", "caption": "Osoby", @@ -1683,6 +1695,8 @@ "create": "Vytvoriť", "name": "Meno", "password": "Heslo", + "password_confirm": "Potvrdiť heslo", + "password_not_match": "Heslá sa nezhodujú", "username": "Užívateľské meno" }, "caption": "Používatelia", @@ -1699,7 +1713,9 @@ "group": "Skupina", "id": "ID", "name": "Názov", + "new_password": "Nové heslo", "owner": "Vlastník", + "password_changed": "Heslo je zmenené!", "system_generated": "Systémom vytvorený", "system_generated_users_not_editable": "Nie je možné aktualizovať používateľov generovaných systémom.", "system_generated_users_not_removable": "Nie je možné odstrániť používateľov generovaných systémom.", @@ -1872,6 +1888,10 @@ "set_wakeup": "Nastaviť interval prebudenia", "true": "True" }, + "node_management": { + "add_to_group": "Pridať do skupiny", + "remove_from_group": "Odstrániť zo skupiny" + }, "ozw_log": { "introduction": "Zobraziť denník. 0 je minimum (načíta celý protokol) a 1000 je maximum. Načítanie zobrazí statický protokol a posledný riadok sa automaticky aktualizuje s určeným počtom riadkov protokolu." }, @@ -2176,6 +2196,7 @@ "options": "Viac možností", "pick_card": "Ktorú kartu chcete pridať?", "pick_card_view_title": "Ktorú kartu chcete pridať do svojho zobrazenia {name} ?", + "search_cards": "Vyhľadať karty", "show_code_editor": "Zobraziť editor kódu", "show_visual_editor": "Zobraziť vizuálny editor", "toggle_editor": "Prepnúť editor" diff --git a/translations/frontend/zh-Hant.json b/translations/frontend/zh-Hant.json index fd857908ae..a805c1b832 100644 --- a/translations/frontend/zh-Hant.json +++ b/translations/frontend/zh-Hant.json @@ -1552,6 +1552,7 @@ "reload_restart_confirm": "重啟 Home Assistant 以為重整合重新載入", "rename": "重新命名", "restart_confirm": "重啟 Home Assistant 以完成此整合移動", + "services": "{count} {count, plural,\n one {項服務}\n other {項服務}\n}", "settings_button": "編輯 {integration} 設定", "system_options": "系統選項", "system_options_button": "{integration} 系統選項", From 979b7ae6518c01be2c3c78b76fd5f9bb36efbf8f Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Mon, 7 Sep 2020 09:09:42 +0200 Subject: [PATCH 14/23] Add attention required for config flows in progress (#6808) --- src/data/config_flow.ts | 2 + .../integrations/ha-config-integrations.ts | 119 +++++++++++------- src/translations/en.json | 2 + 3 files changed, 78 insertions(+), 45 deletions(-) diff --git a/src/data/config_flow.ts b/src/data/config_flow.ts index a06f8f42ec..94cce83ba8 100644 --- a/src/data/config_flow.ts +++ b/src/data/config_flow.ts @@ -13,6 +13,8 @@ export const DISCOVERY_SOURCES = [ "discovery", ]; +export const ATTENTION_SOURCES = ["reauth"]; + export const createConfigFlow = (hass: HomeAssistant, handler: string) => hass.callApi("POST", "config/config_entries/flow", { handler, diff --git a/src/panels/config/integrations/ha-config-integrations.ts b/src/panels/config/integrations/ha-config-integrations.ts index dd738133f7..99d7f6b266 100644 --- a/src/panels/config/integrations/ha-config-integrations.ts +++ b/src/panels/config/integrations/ha-config-integrations.ts @@ -10,12 +10,13 @@ import { CSSResult, customElement, html, + internalProperty, LitElement, property, - internalProperty, PropertyValues, TemplateResult, } from "lit-element"; +import { classMap } from "lit-html/directives/class-map"; import memoizeOne from "memoize-one"; import { HASSDomEvent } from "../../../common/dom/fire_event"; import "../../../common/search/search-input"; @@ -32,6 +33,7 @@ import { getConfigEntries, } from "../../../data/config_entries"; import { + ATTENTION_SOURCES, DISCOVERY_SOURCES, getConfigFlowInProgressCollection, ignoreConfigFlow, @@ -355,52 +357,67 @@ class HaConfigIntegrations extends SubscribeMixin(LitElement) { : ""} ${configEntriesInProgress.length ? configEntriesInProgress.map( - (flow: DataEntryFlowProgressExtended) => html` - -
- ${this.hass.localize( - "ui.panel.config.integrations.discovered" - )} -
-
-
- + (flow: DataEntryFlowProgressExtended) => { + const attention = ATTENTION_SOURCES.includes( + flow.context.source + ); + return html` + +
+ ${this.hass.localize( + `ui.panel.config.integrations.${ + attention ? "attention" : "discovered" + }` + )}
-

- ${flow.localized_title} -

-
- - ${this.hass.localize( - "ui.panel.config.integrations.configure" - )} - - ${DISCOVERY_SOURCES.includes(flow.context.source) && - flow.context.unique_id - ? html` - - ${this.hass.localize( - "ui.panel.config.integrations.ignore.ignore" - )} - - ` - : ""} +
+
+ +
+

+ ${flow.localized_title} +

+
+ + ${this.hass.localize( + `ui.panel.config.integrations.${ + attention ? "reconfigure" : "configure" + }` + )} + + ${DISCOVERY_SOURCES.includes(flow.context.source) && + flow.context.unique_id + ? html` + + ${this.hass.localize( + "ui.panel.config.integrations.ignore.ignore" + )} + + ` + : ""} +
-
-
- ` + + `; + } ) : ""} ${groupedConfigEntries.size @@ -639,6 +656,18 @@ class HaConfigIntegrations extends SubscribeMixin(LitElement) { flex-direction: column; justify-content: space-between; } + .attention { + --ha-card-border-color: var(--error-color); + } + .attention .header { + background: var(--error-color); + color: var(--text-primary-color); + padding: 8px; + text-align: center; + } + .attention mwc-button { + --mdc-theme-primary: var(--error-color); + } .discovered { --ha-card-border-color: var(--primary-color); } diff --git a/src/translations/en.json b/src/translations/en.json index cd234428f5..434e67cb0c 100755 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -1610,6 +1610,7 @@ "description": "Manage integrations", "integration": "integration", "discovered": "Discovered", + "attention": "Attention required", "configured": "Configured", "new": "Set up a new integration", "add_integration": "Add integration", @@ -1618,6 +1619,7 @@ "note_about_website_reference": "More are available on the ", "home_assistant_website": "Home Assistant website", "configure": "Configure", + "reconfigure": "Reconfigure", "none": "Nothing configured yet", "none_found": "No integrations found", "none_found_detail": "Adjust your search criteria.", From d5bc498373fc9822789b30ae6d54d948eb8d4a06 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Mon, 7 Sep 2020 13:41:59 +0200 Subject: [PATCH 15/23] Fix action handler bugs (#6811) --- src/components/ha-sidebar.ts | 6 ++++ .../directives/action-handler-directive.ts | 32 +++++++++---------- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/src/components/ha-sidebar.ts b/src/components/ha-sidebar.ts index 12b1c17d39..2f6c72bb4b 100644 --- a/src/components/ha-sidebar.ts +++ b/src/components/ha-sidebar.ts @@ -31,6 +31,7 @@ import memoizeOne from "memoize-one"; import { LocalStorage } from "../common/decorators/local-storage"; import { fireEvent } from "../common/dom/fire_event"; import { computeDomain } from "../common/entity/compute_domain"; +import { navigate } from "../common/navigate"; import { compare } from "../common/string/compare"; import { computeRTL } from "../common/util/compute_rtl"; import { ActionHandlerDetail } from "../data/lovelace"; @@ -649,6 +650,10 @@ class HaSidebar extends LitElement { ); } + private _handlePanelTap(ev: Event) { + navigate(this, (ev.currentTarget as HTMLAnchorElement).href); + } + private _renderPanel( urlPath: string, title: string | null, @@ -661,6 +666,7 @@ class HaSidebar extends LitElement { href="${`/${urlPath}`}" data-panel="${urlPath}" tabindex="-1" + @tap=${this._handlePanelTap} @mouseenter=${this._itemMouseEnter} @mouseleave=${this._itemMouseLeave} > diff --git a/src/panels/lovelace/common/directives/action-handler-directive.ts b/src/panels/lovelace/common/directives/action-handler-directive.ts index 09dc3c4351..0c245a4764 100644 --- a/src/panels/lovelace/common/directives/action-handler-directive.ts +++ b/src/panels/lovelace/common/directives/action-handler-directive.ts @@ -44,6 +44,8 @@ class ActionHandler extends HTMLElement implements ActionHandler { protected held = false; + private cancelled = false; + private dblClickTimeout?: number; constructor() { @@ -76,9 +78,12 @@ class ActionHandler extends HTMLElement implements ActionHandler { document.addEventListener( ev, () => { - clearTimeout(this.timer); - this.stopAnimation(); - this.timer = undefined; + this.cancelled = true; + if (this.timer) { + this.stopAnimation(); + clearTimeout(this.timer); + this.timer = undefined; + } }, { passive: true } ); @@ -124,7 +129,7 @@ class ActionHandler extends HTMLElement implements ActionHandler { } element.actionHandler.start = (ev: Event) => { - this.held = false; + this.cancelled = false; let x; let y; if ((ev as TouchEvent).touches) { @@ -136,6 +141,7 @@ class ActionHandler extends HTMLElement implements ActionHandler { } if (options.hasHold) { + this.held = false; this.timer = window.setTimeout(() => { this.startAnimation(x, y); this.held = true; @@ -144,24 +150,20 @@ class ActionHandler extends HTMLElement implements ActionHandler { }; element.actionHandler.end = (ev: Event) => { - // Don't respond on our own generated click - if (!ev.isTrusted) { + // Don't respond when moved or scrolled while touch + if (["touchend", "touchcancel"].includes(ev.type) && this.cancelled) { return; } // Prevent mouse event if touch event - ev.preventDefault(); + if (ev.cancelable) { + ev.preventDefault(); + } if (options.hasHold) { - if ( - ["touchend", "touchcancel"].includes(ev.type) && - this.timer === undefined - ) { - return; - } clearTimeout(this.timer); this.stopAnimation(); this.timer = undefined; } - if (this.held) { + if (options.hasHold && this.held) { fireEvent(element, "action", { action: "hold" }); } else if (options.hasDoubleClick) { if ( @@ -179,8 +181,6 @@ class ActionHandler extends HTMLElement implements ActionHandler { } } else { fireEvent(element, "action", { action: "tap" }); - // Fire the click we prevented the action for - (ev.target as HTMLElement)?.click(); } }; From bb2462483e289dc2cce8a7378b9f0f77cc88450b Mon Sep 17 00:00:00 2001 From: Zack Barett Date: Mon, 7 Sep 2020 06:47:24 -0500 Subject: [PATCH 16/23] Use Sortable to move entities in entities editor (#6810) --- package.json | 1 + src/components/ha-sidebar-sort-styles.ts | 77 -------- src/components/ha-sidebar.ts | 15 +- .../lovelace/components/hui-entity-editor.ts | 176 +++++++++++------- src/resources/ha-sortable-style.ts | 75 ++++++++ yarn.lock | 5 + 6 files changed, 204 insertions(+), 145 deletions(-) delete mode 100644 src/components/ha-sidebar-sort-styles.ts create mode 100644 src/resources/ha-sortable-style.ts diff --git a/package.json b/package.json index 1410d6bf3b..1db467294c 100644 --- a/package.json +++ b/package.json @@ -79,6 +79,7 @@ "@polymer/polymer": "3.1.0", "@thomasloven/round-slider": "0.5.0", "@types/chromecast-caf-sender": "^1.0.3", + "@types/sortablejs": "^1.10.6", "@vaadin/vaadin-combo-box": "^5.0.10", "@vaadin/vaadin-date-picker": "^4.0.7", "@vue/web-component-wrapper": "^1.2.0", diff --git a/src/components/ha-sidebar-sort-styles.ts b/src/components/ha-sidebar-sort-styles.ts deleted file mode 100644 index b87b3c92ba..0000000000 --- a/src/components/ha-sidebar-sort-styles.ts +++ /dev/null @@ -1,77 +0,0 @@ -import { html } from "lit-element"; - -export const sortStyles = html` - -`; diff --git a/src/components/ha-sidebar.ts b/src/components/ha-sidebar.ts index 2f6c72bb4b..1226fffbc4 100644 --- a/src/components/ha-sidebar.ts +++ b/src/components/ha-sidebar.ts @@ -23,7 +23,6 @@ import { LitElement, property, PropertyValues, - TemplateResult, } from "lit-element"; import { classMap } from "lit-html/directives/class-map"; import { guard } from "lit-html/directives/guard"; @@ -161,7 +160,7 @@ const computePanels = memoizeOne( let Sortable; -let sortStyles: TemplateResult; +let sortStyles: CSSResult; @customElement("ha-sidebar") class HaSidebar extends LitElement { @@ -229,7 +228,13 @@ class HaSidebar extends LitElement { } return html` - ${this._editMode ? sortStyles : ""} + ${this._editMode + ? html` + + ` + : ""}
- + > Date: Mon, 7 Sep 2020 13:11:49 -0500 Subject: [PATCH 21/23] Updates to correct zindexs on new dialogs (#6816) --- src/panels/lovelace/editor/card-editor/hui-dialog-create-card.ts | 1 + src/panels/lovelace/editor/card-editor/hui-dialog-edit-card.ts | 1 + .../lovelace/editor/card-editor/hui-dialog-suggest-card.ts | 1 + 3 files changed, 3 insertions(+) diff --git a/src/panels/lovelace/editor/card-editor/hui-dialog-create-card.ts b/src/panels/lovelace/editor/card-editor/hui-dialog-create-card.ts index 60ed1350e7..9b3963485c 100644 --- a/src/panels/lovelace/editor/card-editor/hui-dialog-create-card.ts +++ b/src/panels/lovelace/editor/card-editor/hui-dialog-create-card.ts @@ -171,6 +171,7 @@ export class HuiCreateDialogCard extends LitElement implements HassDialog { ha-dialog { --mdc-dialog-max-width: 845px; --dialog-content-padding: 2px 24px 20px 24px; + --dialog-z-index: 5; } ha-dialog.table { diff --git a/src/panels/lovelace/editor/card-editor/hui-dialog-edit-card.ts b/src/panels/lovelace/editor/card-editor/hui-dialog-edit-card.ts index c8caba2a48..87d5ea3115 100755 --- a/src/panels/lovelace/editor/card-editor/hui-dialog-edit-card.ts +++ b/src/panels/lovelace/editor/card-editor/hui-dialog-edit-card.ts @@ -366,6 +366,7 @@ export class HuiDialogEditCard extends LitElement implements HassDialog { ha-dialog { --mdc-dialog-max-width: 845px; + --dialog-z-index: 5; } ha-header-bar { diff --git a/src/panels/lovelace/editor/card-editor/hui-dialog-suggest-card.ts b/src/panels/lovelace/editor/card-editor/hui-dialog-suggest-card.ts index 00e7d8b5a0..0a23b164e6 100755 --- a/src/panels/lovelace/editor/card-editor/hui-dialog-suggest-card.ts +++ b/src/panels/lovelace/editor/card-editor/hui-dialog-suggest-card.ts @@ -140,6 +140,7 @@ export class HuiDialogSuggestCard extends LitElement { } ha-paper-dialog { max-width: 845px; + --dialog-z-index: 5; } mwc-button ha-circular-progress { width: 14px; From 046f7b51539aee691f6d27c775298740d1a0ffb2 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Mon, 7 Sep 2020 20:39:26 +0200 Subject: [PATCH 22/23] Handle media browser errors (#6813) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Joakim Sørensen --- .../media-player/ha-media-player-browse.ts | 143 +++++++++++++----- 1 file changed, 103 insertions(+), 40 deletions(-) diff --git a/src/components/media-player/ha-media-player-browse.ts b/src/components/media-player/ha-media-player-browse.ts index df10572558..8f54e1204c 100644 --- a/src/components/media-player/ha-media-player-browse.ts +++ b/src/components/media-player/ha-media-player-browse.ts @@ -68,6 +68,8 @@ export class HaMediaPlayerBrowse extends LitElement { @internalProperty() private _loading = false; + @internalProperty() private _error?: { message: string; code: string }; + @internalProperty() private _mediaPlayerItems: MediaPlayerItem[] = []; private _resizeObserver?: ResizeObserver; @@ -92,11 +94,55 @@ export class HaMediaPlayerBrowse extends LitElement { this._navigate(item); } + private _renderError(err: { message: string; code: string }) { + if (err.message === "Media directory does not exist.") { + return html` +

No local media found.

+

+ It looks like you have not yet created a media directory. +
Create a directory with the name "media" in the + configuration directory of Home Assistant + (${this.hass.config.config_dir}).
Place your video, audio and + image files in this directory to be able to browse and play them in + the browser or on supported media players. +

+ +

+ Check the + documentation + for more info +

+ `; + } + return err.message; + } + protected render(): TemplateResult { if (this._loading) { return html``; } + if (this._error && !this._mediaPlayerItems.length) { + if (this.dialog) { + this._closeDialogAction(); + showAlertDialog(this, { + title: this.hass.localize( + "ui.components.media-browser.media_browsing_error" + ), + text: this._renderError(this._error), + }); + } else { + return html`
+ ${this._renderError(this._error)} +
`; + } + } + if (!this._mediaPlayerItems.length) { return html``; } @@ -216,7 +262,11 @@ export class HaMediaPlayerBrowse extends LitElement { ` : ""}
- ${currentItem.children?.length + ${this._error + ? html`
+ ${this._renderError(this._error)} +
` + : currentItem.children?.length ? hasExpandableChildren ? html`
@@ -316,7 +366,9 @@ export class HaMediaPlayerBrowse extends LitElement { )} ` - : this.hass.localize("ui.components.media-browser.no_items")} + : html`
+ ${this.hass.localize("ui.components.media-browser.no_items")} +
`} `; } @@ -342,15 +394,22 @@ export class HaMediaPlayerBrowse extends LitElement { return; } - this._fetchData(this.mediaContentId, this.mediaContentType).then( - (itemData) => { + if (changedProps.has("entityId")) { + this._error = undefined; + this._mediaPlayerItems = []; + } + + this._fetchData(this.mediaContentId, this.mediaContentType) + .then((itemData) => { if (!itemData) { return; } this._mediaPlayerItems = [itemData]; - } - ); + }) + .catch((err) => { + this._error = err; + }); } private _actionClicked(ev: MouseEvent): void { @@ -381,12 +440,22 @@ export class HaMediaPlayerBrowse extends LitElement { } private async _navigate(item: MediaPlayerItem) { - const itemData = await this._fetchData( - item.media_content_id, - item.media_content_type - ); + this._error = undefined; - if (!itemData) { + let itemData: MediaPlayerItem; + + try { + itemData = await this._fetchData( + item.media_content_id, + item.media_content_type + ); + } catch (err) { + showAlertDialog(this, { + title: this.hass.localize( + "ui.components.media-browser.media_browsing_error" + ), + text: this._renderError(err), + }); return; } @@ -397,33 +466,23 @@ export class HaMediaPlayerBrowse extends LitElement { private async _fetchData( mediaContentId?: string, mediaContentType?: string - ): Promise { - let itemData: MediaPlayerItem | undefined; - try { - itemData = - this.entityId !== BROWSER_SOURCE - ? await browseMediaPlayer( - this.hass, - this.entityId, - mediaContentId, - mediaContentType - ) - : await browseLocalMediaPlayer(this.hass, mediaContentId); - itemData.children = itemData.children?.sort((first, second) => - !first.can_expand && second.can_expand - ? 1 - : first.can_expand && !second.can_expand - ? -1 - : compare(first.title, second.title) - ); - } catch (error) { - showAlertDialog(this, { - title: this.hass.localize( - "ui.components.media-browser.media_browsing_error" - ), - text: error.message, - }); - } + ): Promise { + const itemData = + this.entityId !== BROWSER_SOURCE + ? await browseMediaPlayer( + this.hass, + this.entityId, + mediaContentId, + mediaContentType + ) + : await browseLocalMediaPlayer(this.hass, mediaContentId); + itemData.children = itemData.children?.sort((first, second) => + !first.can_expand && second.can_expand + ? 1 + : first.can_expand && !second.can_expand + ? -1 + : compare(first.title, second.title) + ); return itemData; } @@ -451,8 +510,8 @@ export class HaMediaPlayerBrowse extends LitElement { this._resizeObserver.observe(this); } - private _hasExpandableChildren = memoizeOne((children) => - children.find((item: MediaPlayerItem) => item.can_expand) + private _hasExpandableChildren = memoizeOne((children?: MediaPlayerItem[]) => + children?.find((item: MediaPlayerItem) => item.can_expand) ); private _closeDialogAction(): void { @@ -471,6 +530,10 @@ export class HaMediaPlayerBrowse extends LitElement { flex-direction: column; } + .container { + padding: 16px; + } + .header { display: flex; justify-content: space-between; From f15fbe53cfcaa122a00427ca9bd7bc882b3f05e3 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Mon, 7 Sep 2020 20:40:03 +0200 Subject: [PATCH 23/23] Bumped version to 20200907.0 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 4c386522cb..b1a1ef7a73 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import setup, find_packages setup( name="home-assistant-frontend", - version="20200904.0", + version="20200907.0", description="The Home Assistant frontend", url="https://github.com/home-assistant/home-assistant-polymer", author="The Home Assistant Authors",