Show parameter number on ZWaveJS device config panel (#9494)

This commit is contained in:
Charles Garwood 2021-07-12 03:41:54 -04:00 committed by GitHub
parent df1ca1fd96
commit e8b53a619d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 2 deletions

View File

@ -176,7 +176,7 @@ class ZWaveJSNodeConfig extends SubscribeMixin(LitElement) {
? html`
${Object.entries(this._config).map(
([id, item]) => html` <ha-settings-row
class="content config-item"
class="config-item"
.configId=${id}
.narrow=${this.narrow}
>
@ -194,6 +194,11 @@ class ZWaveJSNodeConfig extends SubscribeMixin(LitElement) {
private _generateConfigBox(id, item): TemplateResult {
const result = this._results[id];
const labelAndDescription = html`
<span slot="prefix" class="prefix">
${this.hass.localize("ui.panel.config.zwave_js.node_config.parameter")}
<br />
<span>${item.property}</span>
</span>
<span slot="heading">${item.metadata.label}</span>
<span slot="description">
${item.metadata.description}
@ -469,6 +474,20 @@ class ZWaveJSNodeConfig extends SubscribeMixin(LitElement) {
ha-settings-row {
--paper-time-input-justify-content: flex-end;
border-top: 1px solid var(--divider-color);
padding: 4px 16px;
}
.prefix {
color: var(--secondary-text-color);
text-align: center;
text-transform: uppercase;
font-size: 0.8em;
padding-right: 24px;
line-height: 1.5em;
}
.prefix span {
font-size: 1.3em;
}
:host(:not([narrow])) ha-settings-row paper-input {

View File

@ -2629,7 +2629,8 @@
"error_device_not_found": "Device not found",
"set_param_accepted": "The parameter has been updated.",
"set_param_queued": "The parameter change has been queued, and will be updated when the device wakes up.",
"set_param_error": "An error occurred."
"set_param_error": "An error occurred.",
"parameter": "Parameter"
},
"node_status": {
"unknown": "Unknown",