mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 10:16:46 +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._addDevicesTimeoutHandle = setTimeout(
|
||||
() => this._unsubscribe(),
|
||||
75000
|
||||
120000
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -283,45 +283,50 @@ class ZHADeviceCard extends LitElement {
|
||||
this.showActions
|
||||
? html`
|
||||
<div class="card-actions">
|
||||
<mwc-button @click="${this._onReconfigureNodeClick}">
|
||||
${this.hass!.localize(
|
||||
"ui.dialogs.zha_device_info.buttons.reconfigure"
|
||||
)}
|
||||
</mwc-button>
|
||||
${this.showHelp
|
||||
${this.device!.device_type !== "Coordinator"
|
||||
? html`
|
||||
<div class="help-text">
|
||||
<mwc-button @click=${this._onReconfigureNodeClick}>
|
||||
${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
|
||||
.hass=${this.hass}
|
||||
domain="zha"
|
||||
service="remove"
|
||||
.confirmation=${this.hass!.localize(
|
||||
"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"
|
||||
<ha-call-service-button
|
||||
.hass=${this.hass}
|
||||
domain="zha"
|
||||
service="remove"
|
||||
.confirmation=${this.hass!.localize(
|
||||
"ui.dialogs.zha_device_info.confirmations.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!.device_type === "Router"
|
||||
(this.device!.device_type === "Router" ||
|
||||
this.device!.device_type === "Coordinator")
|
||||
? html`
|
||||
<mwc-button @click=${this._onAddDevicesClick}>
|
||||
${this.hass!.localize(
|
||||
|
@ -67,7 +67,7 @@ export class ZHANode extends LitElement {
|
||||
showName
|
||||
showModelInfo
|
||||
.showEntityDetail=${false}
|
||||
.showActions="${this.device.device_type !== "Coordinator"}"
|
||||
showActions
|
||||
@zha-device-removed=${this._onDeviceRemoved}
|
||||
></zha-device-card>
|
||||
`
|
||||
|
Loading…
x
Reference in New Issue
Block a user