Skip to content

Commit

Permalink
docs: update typed documentation and API report
Browse files Browse the repository at this point in the history
  • Loading branch information
AlCalzone committed Jul 5, 2024
1 parent c1c0d25 commit 456cd4c
Show file tree
Hide file tree
Showing 8 changed files with 1,146 additions and 758 deletions.
24 changes: 20 additions & 4 deletions docs/api/CCs/Meter.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,21 @@
### `get`

```ts
async get(options?: MeterCCGetOptions): Promise<{ rateType: RateType; value: number; previousValue: MaybeNotKnown<number>; deltaTime: MaybeUnknown<number>; type: number; scale: MeterScale; } | undefined>;
async get(options?: MeterCCGetOptions): Promise<{ rateType: RateType; value: number; previousValue: MaybeNotKnown<number>; deltaTime: MaybeUnknown<number>; type: number; scale: import("/home/runner/work/node-zwave-js/node-zwave-js/packages/core/build/index").MeterScale; } | undefined>;
```

### `sendReport`

```ts
async sendReport(
options: MeterCCReportOptions,
): Promise<SupervisionResult | undefined>;
```

### `getAll`

```ts
async getAll(): Promise<{ rateType: RateType; value: number; previousValue: MaybeNotKnown<number>; deltaTime: MaybeUnknown<number>; type: number; scale: MeterScale; }[]>;
async getAll(accumulatedOnly: boolean = false): Promise<{ rateType: RateType; value: number; previousValue: MaybeNotKnown<number>; deltaTime: MaybeUnknown<number>; type: number; scale: import("/home/runner/work/node-zwave-js/node-zwave-js/packages/core/build/index").MeterScale; }[]>;
```

### `getSupported`
Expand All @@ -22,6 +30,14 @@ async getAll(): Promise<{ rateType: RateType; value: number; previousValue: Mayb
async getSupported(): Promise<Pick<MeterCCSupportedReport, "type" | "supportsReset" | "supportedScales" | "supportedRateTypes"> | undefined>;
```

### `sendSupportedReport`

```ts
async sendSupportedReport(
options: MeterCCSupportedReportOptions,
): Promise<void>;
```

### `reset`

```ts
Expand Down Expand Up @@ -50,7 +66,7 @@ async reset(
- **secret:** false
- **value type:** `"boolean"`

### `resetSingle(meterType: number)`
### `resetSingle(meterType: number, rateType: RateType, scale: number)`

```ts
{
Expand All @@ -61,7 +77,7 @@ async reset(
}
```

- **label:** `Reset (${string})`
- **label:** `Reset (${string})` | `Reset (Consumption, ${string})` | `Reset (Production, ${string})`
- **min. CC version:** 1
- **readable:** false
- **writeable:** true
Expand Down
1 change: 1 addition & 0 deletions docs/api/driver.md
Original file line number Diff line number Diff line change
Expand Up @@ -907,6 +907,7 @@ interface ZWaveOptions extends ZWaveHostOptions {
*/
watchdog?: boolean;
};
preferences: {
/**
* The preferred scales to use when querying sensors. The key is either:
Expand Down
679 changes: 359 additions & 320 deletions packages/cc/api.md

Large diffs are not rendered by default.

Loading

0 comments on commit 456cd4c

Please sign in to comment.