Change Z-Wave JS API model to match zwave-js (#20793)

* Change Z-Wave JS API model to match zwave-js

* fix qrprovisioninginformation

* remove additional properties from QRProvisioningInformation
This commit is contained in:
Raman Gupta 2024-05-29 03:25:09 -04:00 committed by GitHub
parent 5a2977f4d4
commit febbf34de6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 8 deletions

View File

@ -156,7 +156,7 @@ export interface QRProvisioningInformation {
export interface PlannedProvisioningEntry {
/** The device specific key (DSK) in the form aaaaa-bbbbb-ccccc-ddddd-eeeee-fffff-11111-22222 */
dsk: string;
security_classes: SecurityClass[];
securityClasses: SecurityClass[];
}
export const MINIMUM_QR_STRING_LENGTH = 52;
@ -388,11 +388,9 @@ export const enum NodeStatus {
export interface ZwaveJSProvisioningEntry {
/** The device specific key (DSK) in the form aaaaa-bbbbb-ccccc-ddddd-eeeee-fffff-11111-22222 */
dsk: string;
security_classes: SecurityClass[];
additional_properties: {
nodeId?: number;
[prop: string]: any;
};
securityClasses: SecurityClass[];
nodeId?: number;
[prop: string]: any;
}
export interface RequestedGrant {

View File

@ -49,7 +49,7 @@ class ZWaveJSProvisioned extends LitElement {
type: "icon",
width: "100px",
template: (entry) =>
entry.additional_properties.nodeId
entry.nodeId
? html`
<ha-svg-icon
.label=${this.hass.localize(
@ -82,7 +82,7 @@ class ZWaveJSProvisioned extends LitElement {
filterable: true,
sortable: true,
template: (entry) => {
const securityClasses = entry.security_classes;
const securityClasses = entry.securityClasses;
return securityClasses
.map((secClass) =>
this.hass.localize(