Show err entity registry (#2914)

* Show error in entity registry

* Fix area translations and error message

* Fix person domain filter
This commit is contained in:
Paulus Schoutsen 2019-03-11 22:33:17 -07:00 committed by GitHub
parent 9a00c65e3b
commit eeaaecd5b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 9 deletions

View File

@ -123,7 +123,7 @@ class DialogAreaDetail extends LitElement {
} }
this._params = undefined; this._params = undefined;
} catch (err) { } catch (err) {
this._error = err; this._error = err.message || "Unknown error";
} finally { } finally {
this._submitting = false; this._submitting = false;
} }

View File

@ -86,11 +86,11 @@ class HaConfigAreaRegistry extends LitElement {
? html` ? html`
<div class="empty"> <div class="empty">
${this.hass.localize( ${this.hass.localize(
"ui.panel.config.area_registry.picker.no_areas" "ui.panel.config.area_registry.no_areas"
)} )}
<mwc-button @click=${this._createArea}> <mwc-button @click=${this._createArea}>
${this.hass.localize( ${this.hass.localize(
"ui.panel.config.area_registry.picker.create_area" "ui.panel.config.area_registry.create_area"
)} )}
</mwc-button> </mwc-button>
</div> </div>
@ -104,7 +104,7 @@ class HaConfigAreaRegistry extends LitElement {
?is-wide=${this.isWide} ?is-wide=${this.isWide}
icon="hass:plus" icon="hass:plus"
title="${this.hass.localize( title="${this.hass.localize(
"ui.panel.config.area_registry.picker.create_area" "ui.panel.config.area_registry.create_area"
)}" )}"
@click=${this._createArea} @click=${this._createArea}
class="${classMap({ class="${classMap({

View File

@ -139,7 +139,7 @@ class DialogEntityRegistryDetail extends LitElement {
}); });
this._params = undefined; this._params = undefined;
} catch (err) { } catch (err) {
this._error = err; this._error = err.message || "Unknown error";
} finally { } finally {
this._submitting = false; this._submitting = false;
} }

View File

@ -84,7 +84,7 @@ class DialogPersonDetail extends LitElement {
<ha-entities-picker <ha-entities-picker
.hass=${this.hass} .hass=${this.hass}
.value=${this._deviceTrackers} .value=${this._deviceTrackers}
domainFilter="device_tracker" domain-filter="device_tracker"
.pickedEntityLabel=${this.hass.localize( .pickedEntityLabel=${this.hass.localize(
"ui.panel.config.person.detail.device_tracker_picked" "ui.panel.config.person.detail.device_tracker_picked"
)} )}

View File

@ -560,10 +560,10 @@
"header": "Area Registry", "header": "Area Registry",
"introduction": "Areas are used to organize where devices are. This information will be used throughout Home Assistant to help you in organizing your interface, permissions and integrations with other systems.", "introduction": "Areas are used to organize where devices are. This information will be used throughout Home Assistant to help you in organizing your interface, permissions and integrations with other systems.",
"introduction2": "To place devices in an area, use the link below to navigate to the integrations page and then click on a configured integration to get to the device cards.", "introduction2": "To place devices in an area, use the link below to navigate to the integrations page and then click on a configured integration to get to the device cards.",
"integrations_page": "Integrations page" "integrations_page": "Integrations page",
},
"no_areas": "Looks like you have no areas yet!", "no_areas": "Looks like you have no areas yet!",
"create_area": "CREATE AREA", "create_area": "CREATE AREA"
},
"editor": { "editor": {
"default_name": "New Area", "default_name": "New Area",
"delete": "DELETE", "delete": "DELETE",