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

View File

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