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