hoffmation-base 3.0.0-alpha.7 → 3.0.0-alpha.9
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/models/command/actuatorSetStateCommand.js +1 -1
- package/lib/models/rooms/RoomBase.js +1 -1
- package/lib/server/devices/zigbee/BaseDevices/zigbeeDimmer.js +3 -3
- package/lib/server/devices/zigbee/BaseDevices/zigbeeLedRGBCCT.d.ts +2 -1
- package/lib/server/devices/zigbee/BaseDevices/zigbeeLedRGBCCT.js +3 -0
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -8,7 +8,7 @@ class ActuatorSetStateCommand extends baseCommand_1.BaseCommand {
|
|
|
8
8
|
super(source, reason);
|
|
9
9
|
this.on = on;
|
|
10
10
|
this.timeout = timeout;
|
|
11
|
-
this._commandType = commandType_1.CommandType.
|
|
11
|
+
this._commandType = commandType_1.CommandType.ActuatorSetStateCommand;
|
|
12
12
|
}
|
|
13
13
|
get logMessage() {
|
|
14
14
|
return `Actuator setState to ${this.on} for reason: ${this.reasonTrace}`;
|
|
@@ -115,7 +115,7 @@ class RoomBase {
|
|
|
115
115
|
}
|
|
116
116
|
if (c.movementDependant && this.PraesenzGroup && !((_a = this.PraesenzGroup) === null || _a === void 0 ? void 0 : _a.anyPresent())) {
|
|
117
117
|
this.log(logLevel_1.LogLevel.Trace, 'Turn off lights as no-one is present.');
|
|
118
|
-
this.LightGroup.switchAll(new command_1.ActuatorSetStateCommand(c, false, '
|
|
118
|
+
this.LightGroup.switchAll(new command_1.ActuatorSetStateCommand(c, false, 'No one is present --> Turn off lights.'));
|
|
119
119
|
return;
|
|
120
120
|
}
|
|
121
121
|
if (!this.settings.lampOffset && !this.settings.roomIsAlwaysDark) {
|
|
@@ -62,7 +62,7 @@ class ZigbeeDimmer extends index_1.ZigbeeDevice {
|
|
|
62
62
|
this.setLight(models_1.DimmerSetLightCommand.byTimeBased(this.settings, c));
|
|
63
63
|
}
|
|
64
64
|
setActuator(c) {
|
|
65
|
-
this.setLight(new models_1.DimmerSetLightCommand(c, c.on, '
|
|
65
|
+
this.setLight(new models_1.DimmerSetLightCommand(c, c.on, '', c.timeout));
|
|
66
66
|
}
|
|
67
67
|
toggleActuator(c) {
|
|
68
68
|
const setActuatorCommand = models_1.ActuatorSetStateCommand.byActuatorAndToggleCommand(this, c);
|
|
@@ -92,16 +92,16 @@ 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, services_1.LogDebugType.SetActuator);
|
|
96
95
|
if (c.timeout > -1 && !dontBlock) {
|
|
97
96
|
this.blockAutomationHandler.disableAutomatic(c.timeout, models_1.CollisionSolving.overrideIfGreater);
|
|
98
97
|
}
|
|
99
98
|
if (((_a = services_1.SettingsService.settings.ioBroker) === null || _a === void 0 ? void 0 : _a.useZigbee2mqtt) && !c.on) {
|
|
100
99
|
// With zigbee2mqtt to turn on only setting brighness>0 is needed, so we need state only for turning off
|
|
101
|
-
this.writeActuatorStateToDevice(new models_1.ActuatorWriteStateToDeviceCommand(c, c.on
|
|
100
|
+
this.writeActuatorStateToDevice(new models_1.ActuatorWriteStateToDeviceCommand(c, c.on));
|
|
102
101
|
this.queuedValue = c.on;
|
|
103
102
|
return;
|
|
104
103
|
}
|
|
104
|
+
this.log(models_1.LogLevel.Debug, c.logMessage, services_1.LogDebugType.SetActuator);
|
|
105
105
|
if (c.brightness >= this.settings.turnOnThreshhold) {
|
|
106
106
|
this.setBrightnessState(c.brightness);
|
|
107
107
|
return;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DeviceType } from '../../deviceType';
|
|
2
|
-
import { LampSetTimeBasedCommand, LedSetLightCommand, LedSettings } from '../../../../models';
|
|
2
|
+
import { ActuatorSetStateCommand, LampSetTimeBasedCommand, LedSetLightCommand, LedSettings } from '../../../../models';
|
|
3
3
|
import { IoBrokerDeviceInfo } from '../../IoBrokerDeviceInfo';
|
|
4
4
|
import { iLedRgbCct } from '../../baseDeviceInterfaces/iLedRgbCct';
|
|
5
5
|
import { ZigbeeDimmer } from './zigbeeDimmer';
|
|
@@ -20,6 +20,7 @@ export declare abstract class ZigbeeLedRGBCCT extends ZigbeeDimmer implements iL
|
|
|
20
20
|
* @inheritDoc
|
|
21
21
|
*/
|
|
22
22
|
setTimeBased(c: LampSetTimeBasedCommand): void;
|
|
23
|
+
setActuator(c: ActuatorSetStateCommand): void;
|
|
23
24
|
/**
|
|
24
25
|
* @inheritDoc
|
|
25
26
|
*/
|
|
@@ -41,6 +41,9 @@ class ZigbeeLedRGBCCT extends zigbeeDimmer_1.ZigbeeDimmer {
|
|
|
41
41
|
setTimeBased(c) {
|
|
42
42
|
this.setLight(models_1.LedSetLightCommand.byTimeBased(this.settings, c));
|
|
43
43
|
}
|
|
44
|
+
setActuator(c) {
|
|
45
|
+
this.setLight(new models_1.LedSetLightCommand(c, c.on, '', c.timeout));
|
|
46
|
+
}
|
|
44
47
|
/**
|
|
45
48
|
* @inheritDoc
|
|
46
49
|
*/
|