Compare commits

...

1 Commits

Author SHA1 Message Date
Franck Nijhof 3a10efa91e Count not-ready Z-Wave devices separately from not included
The network status on the Z-Wave dashboard added the not-ready nodes to
the provisioning entries and labeled the total as not included. Not-ready
nodes are included though, their interview just has not completed yet, so
this was confusing.

Report not-ready nodes as not ready and keep not included for the
provisioning entries that have not joined the network yet.
2026-06-19 13:39:55 +00:00
2 changed files with 14 additions and 4 deletions
@@ -135,9 +135,11 @@ class ZWaveJSConfigDashboard extends SubscribeMixin(LitElement) {
const offlineDevices = nodes.filter(
(node) => node.status === NodeStatus.Dead
).length;
const notReadyDevices =
nodes.filter((node) => !node.ready && node.status !== NodeStatus.Dead)
.length + provisioningDevices;
// Not-ready nodes are included but their interview has not completed yet.
// They are distinct from the provisioning entries, which are not included.
const notReadyDevices = nodes.filter(
(node) => !node.ready && node.status !== NodeStatus.Dead
).length;
return html`
<hass-subpage
@@ -201,11 +203,18 @@ class ZWaveJSConfigDashboard extends SubscribeMixin(LitElement) {
}
if (notReadyDevices > 0) {
statusParts.push(
this.hass.localize("ui.panel.config.zwave_js.dashboard.not_included", {
this.hass.localize("ui.panel.config.zwave_js.dashboard.not_ready", {
count: notReadyDevices,
})
);
}
if (provisioningDevices > 0) {
statusParts.push(
this.hass.localize("ui.panel.config.zwave_js.dashboard.not_included", {
count: provisioningDevices,
})
);
}
return html`
<ha-card class="content network-status">
<div class="card-content">
+1
View File
@@ -7492,6 +7492,7 @@
"provisioned_devices": "Provisioned devices",
"provisioned_count": "{count} {count, plural,\n one {provisioned device}\n other {provisioned devices}\n}",
"not_included": "{count} not included",
"not_ready": "{count} not ready",
"devices_offline": "{count} offline",
"rebuild_routes_description": "Rebuilding routes creates heavy traffic and may degrade performance for minutes to hours",
"rebuild_routes_action": "Rebuild",