From fe78f44c5254c40bf4ca720cd68720ed2e4462a0 Mon Sep 17 00:00:00 2001 From: koenkk Date: Thu, 30 Nov 2023 11:51:40 +0100 Subject: [PATCH] fix: Fix some types --- src/controller/model/endpoint.ts | 6 +++--- src/controller/model/group.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/controller/model/endpoint.ts b/src/controller/model/endpoint.ts index 11a42534dc..934184233f 100644 --- a/src/controller/model/endpoint.ts +++ b/src/controller/model/endpoint.ts @@ -17,11 +17,11 @@ const debug = { type Mutable = { -readonly [P in keyof T ]: T[P] }; -interface ConfigureReportingItem { +export interface ConfigureReportingItem { attribute: string | number | {ID: number; type: number}; minimumReportInterval: number; maximumReportInterval: number; - reportableChange: number; + reportableChange: number | [number, number]; } interface Options { @@ -537,7 +537,7 @@ class Endpoint extends Entity { } public async read( - clusterKey: number | string, attributes: string[] | number [], options?: Options + clusterKey: number | string, attributes: (string | number)[], options?: Options ): Promise { const cluster = Zcl.Utils.getCluster(clusterKey); options = this.getOptionsWithDefaults(options, true, Zcl.Direction.CLIENT_TO_SERVER, cluster.manufacturerCode); diff --git a/src/controller/model/group.ts b/src/controller/model/group.ts index 227318dca0..b9d5e5df04 100644 --- a/src/controller/model/group.ts +++ b/src/controller/model/group.ts @@ -176,7 +176,7 @@ class Group extends Entity { } public async read( - clusterKey: number | string, attributes: string[] | number [], options?: Options + clusterKey: number | string, attributes: (string | number)[], options?: Options ): Promise { options = this.getOptionsWithDefaults(options, Zcl.Direction.CLIENT_TO_SERVER); const cluster = Zcl.Utils.getCluster(clusterKey);