iobroker-ucl 1.0.75 → 1.0.77

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.
@@ -21,14 +21,16 @@ function createHomematicDevice(adapter, rawId, baseState, etage, raum, device, c
21
21
  exports.createHomematicDevice = createHomematicDevice;
22
22
  function createDatenpunktSingle(adapter, deviceRawId, attributeType, attributeName, attributeValue, category) {
23
23
  var stateDatenpunkt = "0_userdata.0.devices.homematic." + category + "." + deviceRawId + "." + attributeName;
24
- adapter.createState(stateDatenpunkt, null, {
24
+ adapter.createState(stateDatenpunkt, attributeValue, {
25
25
  name: stateDatenpunkt,
26
26
  desc: stateDatenpunkt,
27
27
  type: attributeType,
28
28
  read: true,
29
29
  write: true
30
30
  });
31
- adapter.setState(stateDatenpunkt, attributeValue);
31
+ if (adapter.getState(stateDatenpunkt).val != attributeValue) {
32
+ adapter.setState(stateDatenpunkt, attributeValue);
33
+ }
32
34
  }
33
35
  function getHomematicDevices(adapter, filterCategory) {
34
36
  var homematicArray = [];
@@ -21,14 +21,16 @@ export function createHomematicDevice(adapter: any, rawId: number, baseState: st
21
21
 
22
22
  function createDatenpunktSingle(adapter: any, deviceRawId, attributeType, attributeName, attributeValue, category) {
23
23
  var stateDatenpunkt = "0_userdata.0.devices.homematic." + category + "." + deviceRawId + "." + attributeName;
24
- adapter.createState(stateDatenpunkt, null, {
24
+ adapter.createState(stateDatenpunkt, attributeValue, {
25
25
  name: stateDatenpunkt,
26
26
  desc: stateDatenpunkt,
27
27
  type: attributeType,
28
28
  read: true,
29
29
  write: true
30
30
  });
31
- adapter.setState(stateDatenpunkt, attributeValue);
31
+ if (adapter.getState(stateDatenpunkt).val != attributeValue) {
32
+ adapter.setState(stateDatenpunkt, attributeValue);
33
+ }
32
34
  }
33
35
 
34
36
  export function getHomematicDevices(adapter: any, filterCategory: string) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker-ucl",
3
- "version": "1.0.75",
3
+ "version": "1.0.77",
4
4
  "main": "main.js",
5
5
  "scripts": {
6
6
  "build": "tsc --build",
package/zigbeeClasses.js CHANGED
@@ -1142,31 +1142,31 @@ var AlexaInputConverter = /** @class */ (function () {
1142
1142
  this.ctNew = this.adapter.getState(value).val;
1143
1143
  this.actionChangeCT = true;
1144
1144
  }
1145
- this.adapter.log("");
1146
- this.adapter.log(">>> ALEXA (" + logContext + ") >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
1147
- this.adapter.log(" Value : " + this.value);
1148
- this.adapter.log(" smartName : " + this.smartName);
1149
- this.adapter.log(" actionTurnOn : " + this.actionTurnOn);
1150
- this.adapter.log(" actionTurnOff : " + this.actionTurnOff);
1145
+ adapter.log("");
1146
+ adapter.log(">>> ALEXA (" + logContext + ") >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
1147
+ adapter.log(" Value : " + this.value);
1148
+ adapter.log(" smartName : " + this.smartName);
1149
+ adapter.log(" actionTurnOn : " + this.actionTurnOn);
1150
+ adapter.log(" actionTurnOff : " + this.actionTurnOff);
1151
1151
  if (this.actionChangeLevel) {
1152
- this.adapter.log(" actionChangeLevel: " + this.actionChangeLevel + " (" + this.levelNew + ")");
1152
+ adapter.log(" actionChangeLevel: " + this.actionChangeLevel + " (" + this.levelNew + ")");
1153
1153
  }
1154
1154
  else {
1155
- this.adapter.log(" actionChangeLevel: " + this.actionChangeLevel);
1155
+ adapter.log(" actionChangeLevel: " + this.actionChangeLevel);
1156
1156
  }
1157
1157
  if (this.actionChangeColor) {
1158
- this.adapter.log(" actionChangeColor: " + this.actionChangeColor + " (" + this.hueNew + ")");
1158
+ adapter.log(" actionChangeColor: " + this.actionChangeColor + " (" + this.hueNew + ")");
1159
1159
  }
1160
1160
  else {
1161
- this.adapter.log(" actionChangeColor: " + this.actionChangeColor);
1161
+ adapter.log(" actionChangeColor: " + this.actionChangeColor);
1162
1162
  }
1163
1163
  if (this.actionChangeCT) {
1164
- this.adapter.log(" actionChangeCT: " + this.actionChangeCT + " (" + this.ctNew + ")");
1164
+ adapter.log(" actionChangeCT: " + this.actionChangeCT + " (" + this.ctNew + ")");
1165
1165
  }
1166
1166
  else {
1167
- this.adapter.log(" actionChangeCT: " + this.actionChangeCT);
1167
+ adapter.log(" actionChangeCT: " + this.actionChangeCT);
1168
1168
  }
1169
- this.adapter.log("<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<");
1169
+ adapter.log("<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<");
1170
1170
  }
1171
1171
  AlexaInputConverter.prototype.isActionTurnedOn = function () {
1172
1172
  return this.actionTurnOn;
package/zigbeeClasses.ts CHANGED
@@ -1280,28 +1280,28 @@ export class AlexaInputConverter {
1280
1280
  this.ctNew = this.adapter.getState(value).val;
1281
1281
  this.actionChangeCT = true;
1282
1282
  }
1283
- this.adapter.log("");
1284
- this.adapter.log(">>> ALEXA (" + logContext + ") >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
1285
- this.adapter.log(" Value : " + this.value);
1286
- this.adapter.log(" smartName : " + this.smartName);
1287
- this.adapter.log(" actionTurnOn : " + this.actionTurnOn);
1288
- this.adapter.log(" actionTurnOff : " + this.actionTurnOff);
1283
+ adapter.log("");
1284
+ adapter.log(">>> ALEXA (" + logContext + ") >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
1285
+ adapter.log(" Value : " + this.value);
1286
+ adapter.log(" smartName : " + this.smartName);
1287
+ adapter.log(" actionTurnOn : " + this.actionTurnOn);
1288
+ adapter.log(" actionTurnOff : " + this.actionTurnOff);
1289
1289
  if (this.actionChangeLevel) {
1290
- this.adapter.log(" actionChangeLevel: " + this.actionChangeLevel + " (" + this.levelNew + ")");
1290
+ adapter.log(" actionChangeLevel: " + this.actionChangeLevel + " (" + this.levelNew + ")");
1291
1291
  } else {
1292
- this.adapter.log(" actionChangeLevel: " + this.actionChangeLevel);
1292
+ adapter.log(" actionChangeLevel: " + this.actionChangeLevel);
1293
1293
  }
1294
1294
  if (this.actionChangeColor) {
1295
- this.adapter.log(" actionChangeColor: " + this.actionChangeColor + " (" + this.hueNew + ")");
1295
+ adapter.log(" actionChangeColor: " + this.actionChangeColor + " (" + this.hueNew + ")");
1296
1296
  } else {
1297
- this.adapter.log(" actionChangeColor: " + this.actionChangeColor);
1297
+ adapter.log(" actionChangeColor: " + this.actionChangeColor);
1298
1298
  }
1299
1299
  if (this.actionChangeCT) {
1300
- this.adapter.log(" actionChangeCT: " + this.actionChangeCT + " (" + this.ctNew + ")");
1300
+ adapter.log(" actionChangeCT: " + this.actionChangeCT + " (" + this.ctNew + ")");
1301
1301
  } else {
1302
- this.adapter.log(" actionChangeCT: " + this.actionChangeCT);
1302
+ adapter.log(" actionChangeCT: " + this.actionChangeCT);
1303
1303
  }
1304
- this.adapter.log("<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<");
1304
+ adapter.log("<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<");
1305
1305
  }
1306
1306
 
1307
1307
  public isActionTurnedOn() : boolean {
@@ -662,14 +662,16 @@ function createLampeRGB(adapter, rawId, baseState, etage, raum, device, isGroup,
662
662
  exports.createLampeRGB = createLampeRGB;
663
663
  function createDatenpunktSingle(adapter, deviceRawId, attributeType, attributeName, attributeValue, category) {
664
664
  var stateDatenpunkt = "0_userdata.0.devices.zigbee." + category + "." + deviceRawId + "." + attributeName;
665
- adapter.createState(stateDatenpunkt, null, {
665
+ adapter.createState(stateDatenpunkt, attributeValue, {
666
666
  name: stateDatenpunkt,
667
667
  desc: stateDatenpunkt,
668
668
  type: attributeType,
669
669
  read: true,
670
670
  write: true
671
- });
672
- adapter.setState(stateDatenpunkt, attributeValue);
671
+ });
672
+ if (adapter.getState(stateDatenpunkt).val != attributeValue) {
673
+ adapter.setState(stateDatenpunkt, attributeValue);
674
+ }
673
675
  }
674
676
  function toStringArray(databaseValue) {
675
677
  var stringArray = [];
@@ -706,14 +706,16 @@ export function createLampeRGB(adapter:any, rawId: number, baseState: string, et
706
706
 
707
707
  function createDatenpunktSingle(adapter:any, deviceRawId, attributeType, attributeName, attributeValue, category:string) {
708
708
  var stateDatenpunkt = "0_userdata.0.devices.zigbee." + category + "." + deviceRawId + "." + attributeName;
709
- adapter.createState(stateDatenpunkt, null, {
709
+ adapter.createState(stateDatenpunkt, attributeValue, {
710
710
  name: stateDatenpunkt,
711
711
  desc: stateDatenpunkt,
712
712
  type: attributeType,
713
713
  read: true,
714
714
  write: true
715
715
  });
716
- adapter.setState(stateDatenpunkt, attributeValue);
716
+ if (adapter.getState(stateDatenpunkt).val != attributeValue) {
717
+ adapter.setState(stateDatenpunkt, attributeValue);
718
+ }
717
719
  }
718
720
 
719
721
  function toStringArray(databaseValue) { // z.B. "Werkbank|Arbeiten|Keller"