homebridge-bomgovau-v2 0.2.2 → 0.2.4
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/index.js +1 -1
- package/package.json +1 -1
- package/scripts/test-bom-feed.js +3 -1
package/index.js
CHANGED
|
@@ -75,7 +75,7 @@ class BOMgovauAccessory {
|
|
|
75
75
|
|
|
76
76
|
// Load community types and FakeGato - instance local, not global
|
|
77
77
|
/** @type {Object} */
|
|
78
|
-
|
|
78
|
+
this.CommunityTypes = require("hap-nodejs-community-types")(api.hap);
|
|
79
79
|
/** @type {Function} */
|
|
80
80
|
this.FakeGatoHistoryService = require("fakegato-history")(api);
|
|
81
81
|
|
package/package.json
CHANGED
package/scripts/test-bom-feed.js
CHANGED
|
@@ -67,7 +67,8 @@ Module._load = function(request, parent, isMain) {
|
|
|
67
67
|
return { Service, Characteristic };
|
|
68
68
|
}
|
|
69
69
|
if (request === "hap-nodejs-community-types") {
|
|
70
|
-
|
|
70
|
+
// The module now receives api.hap, so we need to handle it properly
|
|
71
|
+
return (hap) => ({ AtmosphericPressureLevel: "AtmosphericPressureLevel" });
|
|
71
72
|
}
|
|
72
73
|
if (request === "fakegato-history") {
|
|
73
74
|
return () => historyService;
|
|
@@ -81,6 +82,7 @@ function characteristicValue(service, type) {
|
|
|
81
82
|
|
|
82
83
|
async function main() {
|
|
83
84
|
const api = {
|
|
85
|
+
hap: { Service, Characteristic, uuid: () => "mock-uuid" },
|
|
84
86
|
registerAccessory(pluginName, accessoryName, accessoryClass) {
|
|
85
87
|
this.accessoryClass = accessoryClass;
|
|
86
88
|
this.accessoryName = accessoryName;
|