hoffmation-base 3.0.0-alpha.5 → 3.0.0-alpha.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.
- package/lib/server/devices/groups/lightGroup.js +3 -3
- package/lib/server/devices/zigbee/BaseDevices/zigbeeDevice.js +8 -6
- package/lib/server/devices/zigbee/BaseDevices/zigbeeDimmer.js +1 -1
- package/lib/server/services/govee/own-govee-device.js +1 -3
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -106,16 +106,16 @@ class LightGroup extends base_group_1.BaseGroup {
|
|
|
106
106
|
resultLampen = darkOutside;
|
|
107
107
|
}
|
|
108
108
|
if (resultLampen) {
|
|
109
|
-
this.setAllLampenTimeBased(new models_1.LampSetTimeBasedCommand(
|
|
109
|
+
this.setAllLampenTimeBased(new models_1.LampSetTimeBasedCommand(c, c.time, 'LightGroup switchTimeConditional'));
|
|
110
110
|
}
|
|
111
111
|
else {
|
|
112
|
-
this.setAllLampen(new models_1.LampSetLightCommand(
|
|
112
|
+
this.setAllLampen(new models_1.LampSetLightCommand(c, false, 'LightGroup switchTimeConditional --> off'));
|
|
113
113
|
}
|
|
114
114
|
if (resultSteckdosen) {
|
|
115
115
|
this.setAllActuatorsTimeBased(c.time);
|
|
116
116
|
}
|
|
117
117
|
else {
|
|
118
|
-
this.setAllOutlets(new models_1.ActuatorSetStateCommand(
|
|
118
|
+
this.setAllOutlets(new models_1.ActuatorSetStateCommand(c, false, 'LightGroup switchTimeConditional --> off'));
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
setAllLampen(c) {
|
|
@@ -40,16 +40,18 @@ class ZigbeeDevice extends IoBrokerBaseDevice_1.IoBrokerBaseDevice {
|
|
|
40
40
|
}
|
|
41
41
|
switch (idSplit[3]) {
|
|
42
42
|
case 'available':
|
|
43
|
-
|
|
44
|
-
if (
|
|
45
|
-
this.log(models_1.LogLevel.Debug, `
|
|
43
|
+
const newAvailability = state.val;
|
|
44
|
+
if (this._available && !newAvailability) {
|
|
45
|
+
this.log(models_1.LogLevel.Debug, `Device became unavailable.`);
|
|
46
46
|
}
|
|
47
|
+
this._available = newAvailability;
|
|
47
48
|
break;
|
|
48
49
|
case 'link_quality':
|
|
49
|
-
|
|
50
|
-
if (this._linkQuality
|
|
51
|
-
this.log(models_1.LogLevel.Debug, `
|
|
50
|
+
const newValue = state.val;
|
|
51
|
+
if (this._linkQuality > 5 && newValue <= 5) {
|
|
52
|
+
this.log(models_1.LogLevel.Debug, `The link-quality dropped to a critical level: ${newValue}`);
|
|
52
53
|
}
|
|
54
|
+
this._linkQuality = state.val;
|
|
53
55
|
break;
|
|
54
56
|
}
|
|
55
57
|
this.stateMap.set(idSplit[3], state);
|
|
@@ -92,7 +92,7 @@ class ZigbeeDimmer extends index_1.ZigbeeDevice {
|
|
|
92
92
|
if (c.on && c.brightness <= 0 && this.brightness < 10) {
|
|
93
93
|
c.brightness = 10;
|
|
94
94
|
}
|
|
95
|
-
this.log(models_1.LogLevel.Debug, c.logMessage);
|
|
95
|
+
this.log(models_1.LogLevel.Debug, c.logMessage, services_1.LogDebugType.SetActuator);
|
|
96
96
|
if (c.timeout > -1 && !dontBlock) {
|
|
97
97
|
this.blockAutomationHandler.disableAutomatic(c.timeout, models_1.CollisionSolving.overrideIfGreater);
|
|
98
98
|
}
|
|
@@ -109,7 +109,7 @@ class OwnGoveeDevice {
|
|
|
109
109
|
if (c.on && c.brightness === -1 && this.brightness < 10) {
|
|
110
110
|
c.brightness = 10;
|
|
111
111
|
}
|
|
112
|
-
this.log(models_1.LogLevel.Debug, c.logMessage);
|
|
112
|
+
this.log(models_1.LogLevel.Debug, c.logMessage, log_service_1.LogDebugType.SetActuator);
|
|
113
113
|
const formattedColor = utils_1.Utils.formatHex(c.color);
|
|
114
114
|
if (formattedColor !== null) {
|
|
115
115
|
this.setColor(c.color);
|
|
@@ -118,10 +118,8 @@ class OwnGoveeDevice {
|
|
|
118
118
|
if (devices_1.LampUtils.checkBlockActive(this, c)) {
|
|
119
119
|
return;
|
|
120
120
|
}
|
|
121
|
-
this.log(models_1.LogLevel.Debug, `Set Light Acutator to "${c.on}" with brightness ${c.brightness}`, log_service_1.LogDebugType.SetActuator);
|
|
122
121
|
if (c.brightness > -1 && c.on) {
|
|
123
122
|
this.setBrightness(c.brightness, () => {
|
|
124
|
-
this.log(models_1.LogLevel.Debug, `Brightness set to ${c.brightness}`);
|
|
125
123
|
this.turnOn();
|
|
126
124
|
});
|
|
127
125
|
}
|