mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-20 07:46:37 +00:00
Handle disabled ZWave provisionning entries (#26132)
* Handle disabled ZWave provisionning entries * Update src/translations/en.json Co-authored-by: Norbert Rittel <norbert@rittel.de> --------- Co-authored-by: Simon Lamon <32477463+silamon@users.noreply.github.com> Co-authored-by: Norbert Rittel <norbert@rittel.de>
This commit is contained in:
parent
065c98c5d7
commit
8b781cec8e
@ -439,6 +439,7 @@ export interface ZwaveJSProvisioningEntry {
|
||||
dsk: string;
|
||||
securityClasses: SecurityClass[];
|
||||
nodeId?: number;
|
||||
status: ProvisioningEntryStatus;
|
||||
[prop: string]: any;
|
||||
}
|
||||
|
||||
|
@ -37,6 +37,7 @@ import {
|
||||
fetchZwaveNetworkStatus,
|
||||
fetchZwaveProvisioningEntries,
|
||||
InclusionState,
|
||||
ProvisioningEntryStatus,
|
||||
restoreZwaveNVM,
|
||||
setZwaveDataCollectionPreference,
|
||||
subscribeS2Inclusion,
|
||||
@ -134,7 +135,10 @@ class ZWaveJSConfigDashboard extends SubscribeMixin(LitElement) {
|
||||
return this._renderErrorScreen();
|
||||
}
|
||||
const provisioningDevices =
|
||||
this._provisioningEntries?.filter((entry) => !entry.nodeId).length ?? 0;
|
||||
this._provisioningEntries?.filter(
|
||||
(entry) =>
|
||||
!entry.nodeId && entry.status === ProvisioningEntryStatus.Active
|
||||
).length ?? 0;
|
||||
const notReadyDevices =
|
||||
(this._network?.controller.nodes.filter((node) => !node.ready).length ??
|
||||
0) + provisioningDevices;
|
||||
|
@ -6,6 +6,7 @@ import type { DataTableColumnContainer } from "../../../../../components/data-ta
|
||||
import type { ZwaveJSProvisioningEntry } from "../../../../../data/zwave_js";
|
||||
import {
|
||||
fetchZwaveProvisioningEntries,
|
||||
ProvisioningEntryStatus,
|
||||
SecurityClass,
|
||||
unprovisionZwaveSmartStartNode,
|
||||
} from "../../../../../data/zwave_js";
|
||||
@ -68,6 +69,14 @@ class ZWaveJSProvisioned extends LitElement {
|
||||
></ha-svg-icon>
|
||||
`,
|
||||
},
|
||||
active: {
|
||||
title: localize("ui.panel.config.zwave_js.provisioned.active"),
|
||||
type: "icon",
|
||||
template: (entry) =>
|
||||
entry.status === ProvisioningEntryStatus.Active
|
||||
? html`<ha-svg-icon .path=${mdiCheckCircle}></ha-svg-icon>`
|
||||
: html`<ha-svg-icon .path=${mdiCloseCircleOutline}></ha-svg-icon>`,
|
||||
},
|
||||
dsk: {
|
||||
main: true,
|
||||
title: localize("ui.panel.config.zwave_js.provisioned.dsk"),
|
||||
|
@ -6192,9 +6192,10 @@
|
||||
"security_classes": "Security classes",
|
||||
"unprovision": "Unprovision",
|
||||
"included": "Included",
|
||||
"not_included": "Not Included",
|
||||
"not_included": "Not included",
|
||||
"confirm_unprovision_title": "Remove device?",
|
||||
"confirm_unprovision_text": "{name} will be permanently removed from Home Assistant and your Z-Wave network."
|
||||
"confirm_unprovision_text": "{name} will be permanently removed from Home Assistant and your Z-Wave network.",
|
||||
"active": "Active"
|
||||
},
|
||||
"security_classes": {
|
||||
"None": {
|
||||
|
Loading…
x
Reference in New Issue
Block a user