mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-20 15:56:35 +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;
|
dsk: string;
|
||||||
securityClasses: SecurityClass[];
|
securityClasses: SecurityClass[];
|
||||||
nodeId?: number;
|
nodeId?: number;
|
||||||
|
status: ProvisioningEntryStatus;
|
||||||
[prop: string]: any;
|
[prop: string]: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,6 +37,7 @@ import {
|
|||||||
fetchZwaveNetworkStatus,
|
fetchZwaveNetworkStatus,
|
||||||
fetchZwaveProvisioningEntries,
|
fetchZwaveProvisioningEntries,
|
||||||
InclusionState,
|
InclusionState,
|
||||||
|
ProvisioningEntryStatus,
|
||||||
restoreZwaveNVM,
|
restoreZwaveNVM,
|
||||||
setZwaveDataCollectionPreference,
|
setZwaveDataCollectionPreference,
|
||||||
subscribeS2Inclusion,
|
subscribeS2Inclusion,
|
||||||
@ -134,7 +135,10 @@ class ZWaveJSConfigDashboard extends SubscribeMixin(LitElement) {
|
|||||||
return this._renderErrorScreen();
|
return this._renderErrorScreen();
|
||||||
}
|
}
|
||||||
const provisioningDevices =
|
const provisioningDevices =
|
||||||
this._provisioningEntries?.filter((entry) => !entry.nodeId).length ?? 0;
|
this._provisioningEntries?.filter(
|
||||||
|
(entry) =>
|
||||||
|
!entry.nodeId && entry.status === ProvisioningEntryStatus.Active
|
||||||
|
).length ?? 0;
|
||||||
const notReadyDevices =
|
const notReadyDevices =
|
||||||
(this._network?.controller.nodes.filter((node) => !node.ready).length ??
|
(this._network?.controller.nodes.filter((node) => !node.ready).length ??
|
||||||
0) + provisioningDevices;
|
0) + provisioningDevices;
|
||||||
|
@ -6,6 +6,7 @@ import type { DataTableColumnContainer } from "../../../../../components/data-ta
|
|||||||
import type { ZwaveJSProvisioningEntry } from "../../../../../data/zwave_js";
|
import type { ZwaveJSProvisioningEntry } from "../../../../../data/zwave_js";
|
||||||
import {
|
import {
|
||||||
fetchZwaveProvisioningEntries,
|
fetchZwaveProvisioningEntries,
|
||||||
|
ProvisioningEntryStatus,
|
||||||
SecurityClass,
|
SecurityClass,
|
||||||
unprovisionZwaveSmartStartNode,
|
unprovisionZwaveSmartStartNode,
|
||||||
} from "../../../../../data/zwave_js";
|
} from "../../../../../data/zwave_js";
|
||||||
@ -68,6 +69,14 @@ class ZWaveJSProvisioned extends LitElement {
|
|||||||
></ha-svg-icon>
|
></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: {
|
dsk: {
|
||||||
main: true,
|
main: true,
|
||||||
title: localize("ui.panel.config.zwave_js.provisioned.dsk"),
|
title: localize("ui.panel.config.zwave_js.provisioned.dsk"),
|
||||||
|
@ -6192,9 +6192,10 @@
|
|||||||
"security_classes": "Security classes",
|
"security_classes": "Security classes",
|
||||||
"unprovision": "Unprovision",
|
"unprovision": "Unprovision",
|
||||||
"included": "Included",
|
"included": "Included",
|
||||||
"not_included": "Not Included",
|
"not_included": "Not included",
|
||||||
"confirm_unprovision_title": "Remove device?",
|
"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": {
|
"security_classes": {
|
||||||
"None": {
|
"None": {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user