Skip to content

Commit

Permalink
Change Z-Wave JS API model to match zwave-js (#20793)
Browse files Browse the repository at this point in the history
* Change Z-Wave JS API model to match zwave-js

* fix qrprovisioninginformation

* remove additional properties from QRProvisioningInformation
  • Loading branch information
raman325 authored May 29, 2024
1 parent 5a2977f commit febbf34
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
10 changes: 4 additions & 6 deletions src/data/zwave_js.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit febbf34

Please sign in to comment.