hoffmation-base 3.0.0-alpha.7 → 3.0.0-alpha.8

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.
@@ -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, 'Room.setLightTimeBased but no one is present'));
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, 'Set dimmer due to set ActuactorCommand', c.timeout));
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, 'Set dimmer due to set ActuactorCommand'));
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
  */