mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-28 03:36:44 +00:00
Fix Z-WaveJS device count in dashboard (#25635)
This commit is contained in:
parent
228860a1ee
commit
cd61725cf5
@ -133,8 +133,11 @@ class ZWaveJSConfigDashboard extends SubscribeMixin(LitElement) {
|
|||||||
if (ERROR_STATES.includes(this._configEntry.state)) {
|
if (ERROR_STATES.includes(this._configEntry.state)) {
|
||||||
return this._renderErrorScreen();
|
return this._renderErrorScreen();
|
||||||
}
|
}
|
||||||
|
const provisioningDevices =
|
||||||
|
this._provisioningEntries?.filter((entry) => !entry.nodeId).length ?? 0;
|
||||||
const notReadyDevices =
|
const notReadyDevices =
|
||||||
this._network?.controller.nodes.filter((node) => !node.ready).length ?? 0;
|
(this._network?.controller.nodes.filter((node) => !node.ready).length ??
|
||||||
|
0) + provisioningDevices;
|
||||||
|
|
||||||
return html`
|
return html`
|
||||||
<hass-tabs-subpage
|
<hass-tabs-subpage
|
||||||
@ -182,7 +185,9 @@ class ZWaveJSConfigDashboard extends SubscribeMixin(LitElement) {
|
|||||||
${this.hass.localize(
|
${this.hass.localize(
|
||||||
`ui.panel.config.zwave_js.dashboard.devices`,
|
`ui.panel.config.zwave_js.dashboard.devices`,
|
||||||
{
|
{
|
||||||
count: this._network.controller.nodes.length,
|
count:
|
||||||
|
this._network.controller.nodes.length +
|
||||||
|
provisioningDevices,
|
||||||
}
|
}
|
||||||
)}
|
)}
|
||||||
${notReadyDevices > 0
|
${notReadyDevices > 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user