node-red-contrib-homekit-bridged 1.7.0-dev.6 → 1.7.0-dev.7

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.
@@ -170,14 +170,16 @@ module.exports = function (node) {
170
170
  Object.keys(msg.payload).map((key) => {
171
171
  var _a, _b, _c, _d;
172
172
  if (node.supported.indexOf(key) < 0) {
173
- if (key === 'AdaptiveLightingController') {
173
+ if (key === 'AdaptiveLightingController' && node.adaptiveLightingController) {
174
174
  const value = (_a = msg.payload) === null || _a === void 0 ? void 0 : _a[key];
175
175
  const event = value === null || value === void 0 ? void 0 : value.event;
176
176
  if (event === 'disable') {
177
177
  (_b = node.adaptiveLightingController) === null || _b === void 0 ? void 0 : _b.disableAdaptiveLighting();
178
178
  }
179
179
  }
180
- log.error(`Instead of '${key}' try one of these characteristics: '${node.supported.join("', '")}'`);
180
+ else {
181
+ log.error(`Instead of '${key}' try one of these characteristics: '${node.supported.join("', '")}'`);
182
+ }
181
183
  }
182
184
  else {
183
185
  const value = (_c = msg.payload) === null || _c === void 0 ? void 0 : _c[key];
@@ -152,7 +152,7 @@ module.exports = function (node) {
152
152
  }
153
153
  node.topic_in = (_b = msg.topic) !== null && _b !== void 0 ? _b : '';
154
154
  Object.keys(msg.payload).map((key) => {
155
- var _a, _b, _c;
155
+ var _a, _b, _c, _d, _e;
156
156
  if (node.supported.indexOf(key) < 0) {
157
157
  if (node.config.useEventCallback &&
158
158
  Storage_1.Storage.uuid4Validate(key)) {
@@ -167,13 +167,20 @@ module.exports = function (node) {
167
167
  log.error(`Callback ${callbackID} timeout`);
168
168
  }
169
169
  }
170
+ else if (key === 'AdaptiveLightingController' && node.adaptiveLightingController) {
171
+ const value = (_b = msg.payload) === null || _b === void 0 ? void 0 : _b[key];
172
+ const event = value === null || value === void 0 ? void 0 : value.event;
173
+ if (event === 'disable') {
174
+ (_c = node.adaptiveLightingController) === null || _c === void 0 ? void 0 : _c.disableAdaptiveLighting();
175
+ }
176
+ }
170
177
  else {
171
178
  log.error(`Instead of '${key}' try one of these characteristics: '${node.supported.join("', '")}'`);
172
179
  }
173
180
  }
174
181
  else {
175
- const value = (_b = msg.payload) === null || _b === void 0 ? void 0 : _b[key];
176
- const parentNode = (_c = node.parentNode) !== null && _c !== void 0 ? _c : node;
182
+ const value = (_d = msg.payload) === null || _d === void 0 ? void 0 : _d[key];
183
+ const parentNode = (_e = node.parentNode) !== null && _e !== void 0 ? _e : node;
177
184
  parentNode.reachable = value !== NO_RESPONSE_MSG;
178
185
  const characteristic = node.service.getCharacteristic(Characteristic[key]);
179
186
  if (context !== null) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-red-contrib-homekit-bridged",
3
- "version": "1.7.0-dev.6",
3
+ "version": "1.7.0-dev.7",
4
4
  "description": "Node-RED nodes to simulate Apple HomeKit devices.",
5
5
  "main": "build/nodes/nrchkb.js",
6
6
  "scripts": {