Skip to content

Commit

Permalink
fix: add Z2MClientStatus type (#1357)
Browse files Browse the repository at this point in the history
  • Loading branch information
robertsLando authored Jun 18, 2021
1 parent 25d4873 commit ee4343f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions lib/ZwaveClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,12 @@ export type Z2MValueIdState = {
value: number
}

export type Z2MClientStatus = {
driverReady: boolean
status: boolean
config: ZwaveConfig
}

export type Z2MGroupAssociation = {
groupId: number
nodeId: number
Expand Down Expand Up @@ -673,11 +679,7 @@ class ZwaveClient extends TypedEventEmitter<ZwaveClientEventCallbacks> {
}

getStatus() {
const status: {
driverReady: boolean
status: boolean
config: ZwaveConfig
} = {
const status: Z2MClientStatus = {
driverReady: this.driverReady,
status: this.driverReady && !this.closed,
config: this.cfg,
Expand Down

0 comments on commit ee4343f

Please sign in to comment.