Skip to content

Commit

Permalink
Merged PR 5508: update api
Browse files Browse the repository at this point in the history
  • Loading branch information
peuter committed Jun 4, 2024
2 parents b381611 + 48479c4 commit 22932c6
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@busch-jaeger/free-at-home",
"version": "0.34.13",
"version": "0.34.14",
"description": "Library for free@home local device api",
"repository": {
"type": "git",
Expand Down
4 changes: 1 addition & 3 deletions specs/fhapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1130,9 +1130,7 @@ components:
additionalProperties:
type: string
devices:
type: object
additionalProperties:
$ref: "#/components/schemas/Devices"
$ref: "#/components/schemas/Devices"
devicesAdded:
type: array
items:
Expand Down
3 changes: 3 additions & 0 deletions src/fhapi/models/Device.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ export type Device = {
deviceId?: string;
interface?: string;
nativeId?: string;
unresponsive?: boolean;
unresponsiveCounter?: number;
defect?: boolean;
channels?: Record<string, Channel>;
parameters?: Record<string, string>;
};
Expand Down
2 changes: 1 addition & 1 deletion src/fhapi/models/SysapSection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export type SysapSection = {
version: string;
sunRiseTimes: Array<number>;
sunSetTimes: Array<number>;
locale?: string;
locale?: 'en' | 'es' | 'fr' | 'it' | 'nl' | 'de' | 'zh' | 'da' | 'fi' | 'nb' | 'pl' | 'pt' | 'ru' | 'sv' | 'el' | 'cs' | 'tr';
location?: {
latitude: number;
longitude: number;
Expand Down
2 changes: 1 addition & 1 deletion src/fhapi/models/WebsocketMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import type { ScenesTriggered } from './ScenesTriggered';

export type WebsocketMessage = Record<string, {
datapoints: Record<string, string>;
devices: Record<string, Devices>;
devices: Devices;
devicesAdded: Array<string>;
devicesRemoved: Array<string>;
scenesTriggered: ScenesTriggered;
Expand Down
1 change: 1 addition & 0 deletions src/freeAtHomeApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ export class FreeAtHomeApi extends (EventEmitter as { new(): Emitter }) {
throw new Error("device not found in response");
}
} catch (e) {
handleRequestError(e, this.enableLogging);
return await devicePromiseWithTimeout.promise;
// throw new Error("Could not read device from ata model error code: " + res.status);
}
Expand Down

0 comments on commit 22932c6

Please sign in to comment.