@kohost/api-client 3.7.10 → 3.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Models/Room.js +3 -3
- package/dist/cjs/schemas/definitions.json +0 -3
- package/dist/cjs/schemas/deviceRouter.json +1 -1
- package/dist/cjs/schemas/discoveredDevice.json +7 -2
- package/dist/esm/Models.js +11 -9
- package/dist/esm/Models.js.map +2 -2
- package/dist/esm/utils.js +11 -9
- package/dist/esm/utils.js.map +2 -2
- package/dist/types/schemas/DeviceRouterSchema.d.ts +1 -1
- package/dist/types/schemas/DiscoveredDeviceSchema.d.ts +4 -3
- package/package.json +1 -1
package/dist/cjs/Models/Room.js
CHANGED
|
@@ -126,10 +126,10 @@ class Room extends Entity {
|
|
|
126
126
|
}
|
|
127
127
|
|
|
128
128
|
get hasLight() {
|
|
129
|
-
const
|
|
130
|
-
return sw.
|
|
129
|
+
const hasDiscriminatorLight = this.switches?.some((sw) => {
|
|
130
|
+
return sw.discriminator === "light" || sw.discriminator === "fan";
|
|
131
131
|
});
|
|
132
|
-
return this.hasDimmer ||
|
|
132
|
+
return this.hasDimmer || hasDiscriminatorLight;
|
|
133
133
|
}
|
|
134
134
|
|
|
135
135
|
get occupied() {
|
|
@@ -16,6 +16,11 @@
|
|
|
16
16
|
"type": "string"
|
|
17
17
|
},
|
|
18
18
|
"type": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"enum": ["discoveredDevice"],
|
|
21
|
+
"default": "discoveredDevice"
|
|
22
|
+
},
|
|
23
|
+
"discriminator": {
|
|
19
24
|
"$ref": "definitions.json#/definitions/type"
|
|
20
25
|
},
|
|
21
26
|
"driver": {
|
|
@@ -27,11 +32,11 @@
|
|
|
27
32
|
"ignore": {
|
|
28
33
|
"type": "boolean"
|
|
29
34
|
},
|
|
30
|
-
"
|
|
35
|
+
"organizationId": {
|
|
31
36
|
"type": ["string", "null"],
|
|
32
37
|
"description": "Reference (id) to the organization that owns this device"
|
|
33
38
|
},
|
|
34
|
-
"
|
|
39
|
+
"propertyId": {
|
|
35
40
|
"type": ["string", "null"],
|
|
36
41
|
"description": "Reference (id) to the property that this device belongs to"
|
|
37
42
|
}
|
package/dist/esm/Models.js
CHANGED
|
@@ -7281,9 +7281,6 @@ var require_definitions = __commonJS({
|
|
|
7281
7281
|
name: {
|
|
7282
7282
|
type: "string"
|
|
7283
7283
|
},
|
|
7284
|
-
subType: {
|
|
7285
|
-
type: ["string", "null"]
|
|
7286
|
-
},
|
|
7287
7284
|
supportedNotifications: {
|
|
7288
7285
|
type: "array",
|
|
7289
7286
|
uniqueItems: true,
|
|
@@ -10827,10 +10824,10 @@ var require_Room = __commonJS({
|
|
|
10827
10824
|
return this.mediaSources?.length > 0;
|
|
10828
10825
|
}
|
|
10829
10826
|
get hasLight() {
|
|
10830
|
-
const
|
|
10831
|
-
return sw.
|
|
10827
|
+
const hasDiscriminatorLight = this.switches?.some((sw) => {
|
|
10828
|
+
return sw.discriminator === "light" || sw.discriminator === "fan";
|
|
10832
10829
|
});
|
|
10833
|
-
return this.hasDimmer ||
|
|
10830
|
+
return this.hasDimmer || hasDiscriminatorLight;
|
|
10834
10831
|
}
|
|
10835
10832
|
get occupied() {
|
|
10836
10833
|
const now = /* @__PURE__ */ new Date();
|
|
@@ -11974,6 +11971,11 @@ var require_discoveredDevice = __commonJS({
|
|
|
11974
11971
|
type: "string"
|
|
11975
11972
|
},
|
|
11976
11973
|
type: {
|
|
11974
|
+
type: "string",
|
|
11975
|
+
enum: ["discoveredDevice"],
|
|
11976
|
+
default: "discoveredDevice"
|
|
11977
|
+
},
|
|
11978
|
+
discriminator: {
|
|
11977
11979
|
$ref: "definitions.json#/definitions/type"
|
|
11978
11980
|
},
|
|
11979
11981
|
driver: {
|
|
@@ -11985,11 +11987,11 @@ var require_discoveredDevice = __commonJS({
|
|
|
11985
11987
|
ignore: {
|
|
11986
11988
|
type: "boolean"
|
|
11987
11989
|
},
|
|
11988
|
-
|
|
11990
|
+
organizationId: {
|
|
11989
11991
|
type: ["string", "null"],
|
|
11990
11992
|
description: "Reference (id) to the organization that owns this device"
|
|
11991
11993
|
},
|
|
11992
|
-
|
|
11994
|
+
propertyId: {
|
|
11993
11995
|
type: ["string", "null"],
|
|
11994
11996
|
description: "Reference (id) to the property that this device belongs to"
|
|
11995
11997
|
}
|
|
@@ -12057,7 +12059,7 @@ var require_deviceRouter = __commonJS({
|
|
|
12057
12059
|
driver: {
|
|
12058
12060
|
type: "string"
|
|
12059
12061
|
},
|
|
12060
|
-
|
|
12062
|
+
organizationId: {
|
|
12061
12063
|
type: ["string", "null"],
|
|
12062
12064
|
description: "Reference (id) to the organization that owns this router"
|
|
12063
12065
|
},
|