mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-26 02:36:37 +00:00
Make add devices button available on ZHA coordinator (#5431)
* Make add devices available on ZHA coordinator * Update src/panels/config/zha/zha-device-card.ts Co-Authored-By: Bram Kragten <mail@bramkragten.nl> * Update src/panels/config/zha/zha-device-card.ts Co-Authored-By: Zack Arnett <arnett.zackary@gmail.com> Co-authored-by: Bram Kragten <mail@bramkragten.nl> Co-authored-by: Zack Arnett <arnett.zackary@gmail.com>
This commit is contained in:
parent
0c1714ef78
commit
bd98ce8c25
@ -170,7 +170,7 @@ class ZHAAddDevicesPage extends LitElement {
|
|||||||
this._active = true;
|
this._active = true;
|
||||||
this._addDevicesTimeoutHandle = setTimeout(
|
this._addDevicesTimeoutHandle = setTimeout(
|
||||||
() => this._unsubscribe(),
|
() => this._unsubscribe(),
|
||||||
75000
|
120000
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -283,45 +283,50 @@ class ZHADeviceCard extends LitElement {
|
|||||||
this.showActions
|
this.showActions
|
||||||
? html`
|
? html`
|
||||||
<div class="card-actions">
|
<div class="card-actions">
|
||||||
<mwc-button @click="${this._onReconfigureNodeClick}">
|
${this.device!.device_type !== "Coordinator"
|
||||||
${this.hass!.localize(
|
|
||||||
"ui.dialogs.zha_device_info.buttons.reconfigure"
|
|
||||||
)}
|
|
||||||
</mwc-button>
|
|
||||||
${this.showHelp
|
|
||||||
? html`
|
? html`
|
||||||
<div class="help-text">
|
<mwc-button @click=${this._onReconfigureNodeClick}>
|
||||||
${this.hass!.localize(
|
${this.hass!.localize(
|
||||||
"ui.dialogs.zha_device_info.services.reconfigure"
|
"ui.dialogs.zha_device_info.buttons.reconfigure"
|
||||||
)}
|
)}
|
||||||
</div>
|
</mwc-button>
|
||||||
`
|
${this.showHelp
|
||||||
: ""}
|
? html`
|
||||||
|
<div class="help-text">
|
||||||
|
${this.hass!.localize(
|
||||||
|
"ui.dialogs.zha_device_info.services.reconfigure"
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
`
|
||||||
|
: ""}
|
||||||
|
|
||||||
<ha-call-service-button
|
<ha-call-service-button
|
||||||
.hass=${this.hass}
|
.hass=${this.hass}
|
||||||
domain="zha"
|
domain="zha"
|
||||||
service="remove"
|
service="remove"
|
||||||
.confirmation=${this.hass!.localize(
|
.confirmation=${this.hass!.localize(
|
||||||
"ui.dialogs.zha_device_info.confirmations.remove"
|
"ui.dialogs.zha_device_info.confirmations.remove"
|
||||||
)}
|
|
||||||
.serviceData="${this._serviceData}"
|
|
||||||
>
|
|
||||||
${this.hass!.localize(
|
|
||||||
"ui.dialogs.zha_device_info.buttons.remove"
|
|
||||||
)}
|
|
||||||
</ha-call-service-button>
|
|
||||||
${this.showHelp
|
|
||||||
? html`
|
|
||||||
<div class="help-text">
|
|
||||||
${this.hass!.localize(
|
|
||||||
"ui.dialogs.zha_device_info.services.remove"
|
|
||||||
)}
|
)}
|
||||||
</div>
|
.serviceData=${this._serviceData}
|
||||||
|
>
|
||||||
|
${this.hass!.localize(
|
||||||
|
"ui.dialogs.zha_device_info.buttons.remove"
|
||||||
|
)}
|
||||||
|
</ha-call-service-button>
|
||||||
|
${this.showHelp
|
||||||
|
? html`
|
||||||
|
<div class="help-text">
|
||||||
|
${this.hass!.localize(
|
||||||
|
"ui.dialogs.zha_device_info.services.remove"
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
`
|
||||||
|
: ""}
|
||||||
`
|
`
|
||||||
: ""}
|
: ""}
|
||||||
${this.device!.power_source === "Mains" &&
|
${this.device!.power_source === "Mains" &&
|
||||||
this.device!.device_type === "Router"
|
(this.device!.device_type === "Router" ||
|
||||||
|
this.device!.device_type === "Coordinator")
|
||||||
? html`
|
? html`
|
||||||
<mwc-button @click=${this._onAddDevicesClick}>
|
<mwc-button @click=${this._onAddDevicesClick}>
|
||||||
${this.hass!.localize(
|
${this.hass!.localize(
|
||||||
|
@ -67,7 +67,7 @@ export class ZHANode extends LitElement {
|
|||||||
showName
|
showName
|
||||||
showModelInfo
|
showModelInfo
|
||||||
.showEntityDetail=${false}
|
.showEntityDetail=${false}
|
||||||
.showActions="${this.device.device_type !== "Coordinator"}"
|
showActions
|
||||||
@zha-device-removed=${this._onDeviceRemoved}
|
@zha-device-removed=${this._onDeviceRemoved}
|
||||||
></zha-device-card>
|
></zha-device-card>
|
||||||
`
|
`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user