Skip to content

Commit

Permalink
Fix zwave_js 'add/remove device' disabled bug (home-assistant#12000)
Browse files Browse the repository at this point in the history
* Fix zwave_js 'add/remove device' disabled bug

* revert extra change
  • Loading branch information
raman325 authored Mar 10, 2022
1 parent 246e426 commit 99fd3a1
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,10 @@ class ZWaveJSConfigDashboard extends LitElement {
<mwc-button
@click=${this._removeNodeClicked}
.disabled=${this._status !== "connected" ||
this._network?.controller.inclusion_state !==
InclusionState.Idle}
(this._network?.controller.inclusion_state !==
InclusionState.Idle &&
this._network?.controller.inclusion_state !==
InclusionState.SmartStart)}
>
${this.hass.localize(
"ui.panel.config.zwave_js.common.remove_node"
Expand Down Expand Up @@ -304,7 +306,9 @@ class ZWaveJSConfigDashboard extends LitElement {
?rtl=${computeRTL(this.hass)}
@click=${this._addNodeClicked}
.disabled=${this._status !== "connected" ||
this._network?.controller.inclusion_state !== InclusionState.Idle}
(this._network?.controller.inclusion_state !== InclusionState.Idle &&
this._network?.controller.inclusion_state !==
InclusionState.SmartStart)}
>
<ha-svg-icon slot="icon" .path=${mdiPlus}></ha-svg-icon>
</ha-fab>
Expand Down

0 comments on commit 99fd3a1

Please sign in to comment.