hoffmation-base 3.0.0-alpha.34 → 3.0.0-alpha.36

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.
Files changed (38) hide show
  1. package/lib/models/rooms/RoomBase.js +13 -6
  2. package/lib/server/devices/baseDeviceInterfaces/iLamp.d.ts +0 -4
  3. package/lib/server/devices/groups/lightGroup.js +3 -22
  4. package/lib/server/devices/hmIPDevices/hmIpLampe.d.ts +1 -1
  5. package/lib/server/devices/hmIPDevices/hmIpLampe.js +3 -3
  6. package/lib/server/devices/sharedFunctions/lampUtils.js +1 -1
  7. package/lib/server/devices/wledDevice.js +3 -3
  8. package/lib/server/devices/zigbee/BaseDevices/ZigbeeActuator.d.ts +5 -4
  9. package/lib/server/devices/zigbee/BaseDevices/ZigbeeActuator.js +10 -9
  10. package/lib/server/devices/zigbee/BaseDevices/zigbeeDimmer.js +4 -4
  11. package/lib/server/devices/zigbee/BaseDevices/zigbeeLamp.d.ts +0 -2
  12. package/lib/server/devices/zigbee/BaseDevices/zigbeeLamp.js +3 -11
  13. package/lib/server/devices/zigbee/BaseDevices/zigbeeLedRGBCCT.js +1 -1
  14. package/lib/server/devices/zigbee/zigbeeBlitzShp.d.ts +1 -1
  15. package/lib/server/devices/zigbee/zigbeeBlitzShp.js +1 -1
  16. package/lib/server/devices/zigbee/zigbeeIkeaSteckdose.d.ts +1 -1
  17. package/lib/server/devices/zigbee/zigbeeIkeaSteckdose.js +1 -1
  18. package/lib/server/devices/zigbee/zigbeeIlluActuator.d.ts +1 -1
  19. package/lib/server/devices/zigbee/zigbeeIlluActuator.js +1 -1
  20. package/lib/server/devices/zigbee/zigbeeIlluDimmer.d.ts +1 -1
  21. package/lib/server/devices/zigbee/zigbeeIlluDimmer.js +1 -1
  22. package/lib/server/devices/zigbee/zigbeeIlluLampe.d.ts +1 -1
  23. package/lib/server/devices/zigbee/zigbeeIlluLampe.js +1 -1
  24. package/lib/server/devices/zigbee/zigbeeIlluLedRGBCCT.d.ts +1 -1
  25. package/lib/server/devices/zigbee/zigbeeIlluLedRGBCCT.js +1 -1
  26. package/lib/server/devices/zigbee/zigbeeInnr142C.d.ts +1 -1
  27. package/lib/server/devices/zigbee/zigbeeInnr142C.js +1 -1
  28. package/lib/server/devices/zigbee/zigbeeLinkindLedRgbCct.d.ts +1 -1
  29. package/lib/server/devices/zigbee/zigbeeLinkindLedRgbCct.js +1 -1
  30. package/lib/server/devices/zigbee/zigbeeOsramDimmer.d.ts +1 -1
  31. package/lib/server/devices/zigbee/zigbeeOsramDimmer.js +1 -1
  32. package/lib/server/devices/zigbee/zigbeeUbisysActuator.d.ts +1 -1
  33. package/lib/server/devices/zigbee/zigbeeUbisysActuator.js +1 -1
  34. package/lib/server/devices/zigbee/zigbeeUbisysLampe.d.ts +1 -1
  35. package/lib/server/devices/zigbee/zigbeeUbisysLampe.js +1 -1
  36. package/lib/server/services/govee/own-govee-device.js +3 -3
  37. package/lib/tsconfig.tsbuildinfo +1 -1
  38. package/package.json +1 -1
@@ -110,15 +110,22 @@ class RoomBase {
110
110
  * @param c - The command to execute
111
111
  */
112
112
  setLightTimeBased(c) {
113
- var _a, _b;
113
+ var _a;
114
114
  if (!this.LightGroup) {
115
115
  this.log(logLevel_1.LogLevel.Trace, 'Ignore "setLightTimeBased" as we have no lamps');
116
116
  return;
117
117
  }
118
- if (c.movementDependant && this.PraesenzGroup && !((_a = this.PraesenzGroup) === null || _a === void 0 ? void 0 : _a.anyPresent())) {
119
- this.log(logLevel_1.LogLevel.Trace, 'Turn off lights as no-one is present.');
120
- this.LightGroup.switchAll(new command_1.ActuatorSetStateCommand(c, false, 'No one is present --> Turn off lights.'));
121
- return;
118
+ if (c.movementDependant) {
119
+ if (!this.PraesenzGroup ||
120
+ this.PraesenzGroup.deviceCluster.getDevicesByType(server_1.DeviceClusterType.MotionDetection).length === 0) {
121
+ this.log(logLevel_1.LogLevel.Trace, 'Ignore movement dependant "setLightTimeBased" as we have no Presence Group or no sensors');
122
+ return;
123
+ }
124
+ if (!this.PraesenzGroup.anyPresent()) {
125
+ this.log(logLevel_1.LogLevel.Trace, 'Turn off lights as no-one is present.');
126
+ this.LightGroup.switchAll(new command_1.ActuatorSetStateCommand(c, false, 'No one is present --> Turn off lights.'));
127
+ return;
128
+ }
122
129
  }
123
130
  if (!this.settings.lampOffset && !this.settings.roomIsAlwaysDark) {
124
131
  this.log(logLevel_1.LogLevel.Alert, `Beim Aufruf von "setLightTimeBased" im Raum ${this.roomName} liegt kein Lampen Offset vor`);
@@ -129,7 +136,7 @@ class RoomBase {
129
136
  : server_1.TimeCallbackService.dayType(this.settings.lampOffset);
130
137
  if (timeOfDay === timeCallback_1.TimeOfDay.Daylight &&
131
138
  ((this.settings.lightIfNoWindows && (!this.WindowGroup || this.WindowGroup.windows.length === 0)) ||
132
- ((_b = this.WindowGroup) === null || _b === void 0 ? void 0 : _b.windows.some((f) => {
139
+ ((_a = this.WindowGroup) === null || _a === void 0 ? void 0 : _a.windows.some((f) => {
133
140
  return server_1.ShutterService.anyRolloDown(f.getShutter());
134
141
  })))) {
135
142
  timeOfDay = server_1.Utils.nowTime().hours > 16 ? timeCallback_1.TimeOfDay.AfterSunset : timeCallback_1.TimeOfDay.BeforeSunrise;
@@ -6,10 +6,6 @@ import { iActuator } from './iActuator';
6
6
  * For devices with {@link DeviceCapability.lamp} capability.
7
7
  */
8
8
  export interface iLamp extends iActuator {
9
- /**
10
- * The state value of the device
11
- */
12
- readonly lightOn: boolean;
13
9
  /**
14
10
  * Changes the state of the lamp based on the time
15
11
  * @param command - The command to execute
@@ -17,28 +17,9 @@ class LightGroup extends base_group_1.BaseGroup {
17
17
  this.deviceCluster.deviceMap.set(device_cluster_type_1.DeviceClusterType.WLED, new device_list_1.DeviceList(wledIds));
18
18
  }
19
19
  anyLightsOn() {
20
- let i;
21
- for (i = 0; i < this.getLights().length; i++) {
22
- if (this.getLights()[i].lightOn) {
23
- return true;
24
- }
25
- }
26
- for (i = 0; i < this.getLED().length; i++) {
27
- if (this.getLED()[i].actuatorOn) {
28
- return true;
29
- }
30
- }
31
- for (i = 0; i < this.getOutlets().length; i++) {
32
- if (this.getOutlets()[i].actuatorOn) {
33
- return true;
34
- }
35
- }
36
- for (i = 0; i < this.getWled().length; i++) {
37
- if (this.getWled()[i].actuatorOn) {
38
- return true;
39
- }
40
- }
41
- return false;
20
+ return (this.getAllAsActuator().find((a) => {
21
+ return a.actuatorOn;
22
+ }) !== undefined);
42
23
  }
43
24
  getLights() {
44
25
  return this.deviceCluster.getDevicesByType(device_cluster_type_1.DeviceClusterType.Lamps);
@@ -5,7 +5,7 @@ import { IoBrokerDeviceInfo } from '../IoBrokerDeviceInfo';
5
5
  import { BlockAutomaticHandler } from '../../services/blockAutomaticHandler';
6
6
  export declare class HmIpLampe extends HmIPDevice implements iLamp, iTemporaryDisableAutomatic {
7
7
  /** @inheritDoc */
8
- lightOn: boolean;
8
+ private _actuatorOn;
9
9
  /** @inheritDoc */
10
10
  settings: ActuatorSettings;
11
11
  private lightOnSwitchID;
@@ -12,7 +12,7 @@ class HmIpLampe extends hmIpDevice_1.HmIPDevice {
12
12
  constructor(pInfo) {
13
13
  super(pInfo, deviceType_1.DeviceType.HmIpLampe);
14
14
  /** @inheritDoc */
15
- this.lightOn = false;
15
+ this._actuatorOn = false;
16
16
  /** @inheritDoc */
17
17
  this.settings = new models_1.ActuatorSettings();
18
18
  this.lightOnSwitchID = '';
@@ -26,7 +26,7 @@ class HmIpLampe extends hmIpDevice_1.HmIPDevice {
26
26
  this.blockAutomationHandler = new blockAutomaticHandler_1.BlockAutomaticHandler(this.restoreTargetAutomaticValue.bind(this));
27
27
  }
28
28
  get actuatorOn() {
29
- return this.lightOn;
29
+ return this._actuatorOn;
30
30
  }
31
31
  restoreTargetAutomaticValue(c) {
32
32
  this.setLight(new models_1.LampSetLightCommand(c, this.targetAutomaticState));
@@ -39,7 +39,7 @@ class HmIpLampe extends hmIpDevice_1.HmIPDevice {
39
39
  switch (idSplit[3]) {
40
40
  case '1':
41
41
  if (idSplit[4] === 'STATE') {
42
- this.lightOn = state.val;
42
+ this._actuatorOn = state.val;
43
43
  this.persist();
44
44
  }
45
45
  break;
@@ -42,7 +42,7 @@ class LampUtils {
42
42
  }
43
43
  static toggleLight(device, c) {
44
44
  var _a;
45
- const newVal = device.queuedValue !== null ? !device.queuedValue : !device.lightOn;
45
+ const newVal = device.queuedValue !== null ? !device.queuedValue : !device.actuatorOn;
46
46
  if (newVal && c.time === undefined && c.calculateTime && device.room !== undefined) {
47
47
  c.time = services_1.TimeCallbackService.dayType((_a = device.room) === null || _a === void 0 ? void 0 : _a.settings.lampOffset);
48
48
  }
@@ -69,13 +69,13 @@ class WledDevice extends IoBrokerBaseDevice_1.IoBrokerBaseDevice {
69
69
  if (sharedFunctions_1.LampUtils.checkBlockActive(this, c)) {
70
70
  return;
71
71
  }
72
- if (sharedFunctions_1.LampUtils.canDimmerChangeBeSkipped(this, c)) {
73
- return;
74
- }
75
72
  if (c.isAutomaticAction) {
76
73
  // Preserve the target state for the automatic handler, as
77
74
  this.targetAutomaticState = c.on;
78
75
  }
76
+ if (sharedFunctions_1.LampUtils.canDimmerChangeBeSkipped(this, c)) {
77
+ return;
78
+ }
79
79
  this.log(models_1.LogLevel.Debug, c.logMessage);
80
80
  if (c.on && c.brightness !== -1 && this.brightness < 10) {
81
81
  c.brightness = 10;
@@ -5,20 +5,21 @@ import { iActuator } from '../../baseDeviceInterfaces';
5
5
  import { ZigbeeDevice } from './zigbeeDevice';
6
6
  import { BlockAutomaticHandler } from '../../../services/blockAutomaticHandler';
7
7
  export declare abstract class ZigbeeActuator extends ZigbeeDevice implements iActuator {
8
- private _actuatorOn;
9
8
  /** @inheritDoc */
10
9
  readonly blockAutomationHandler: BlockAutomaticHandler;
11
10
  /** @inheritDoc */
12
11
  targetAutomaticState: boolean;
13
- protected _lastPersist: number;
14
12
  /** @inheritDoc */
15
13
  settings: ActuatorSettings;
16
- protected abstract readonly _stateIdState: string;
17
14
  /** @inheritDoc */
18
15
  queuedValue: boolean | null;
16
+ protected _lastPersist: number;
17
+ protected abstract readonly _actuatorOnStateIdState: string;
18
+ protected readonly _stateNameState: string;
19
+ private _actuatorOn;
20
+ constructor(pInfo: IoBrokerDeviceInfo, type: DeviceType);
19
21
  /** @inheritDoc */
20
22
  get actuatorOn(): boolean;
21
- constructor(pInfo: IoBrokerDeviceInfo, type: DeviceType);
22
23
  /** @inheritDoc */
23
24
  restoreTargetAutomaticValue(c: RestoreTargetAutomaticValueCommand): void;
24
25
  /** @inheritDoc */
@@ -8,25 +8,26 @@ const DeviceCapability_1 = require("../../DeviceCapability");
8
8
  const blockAutomaticHandler_1 = require("../../../services/blockAutomaticHandler");
9
9
  const sharedFunctions_1 = require("../../sharedFunctions");
10
10
  class ZigbeeActuator extends zigbeeDevice_1.ZigbeeDevice {
11
- /** @inheritDoc */
12
- get actuatorOn() {
13
- return this._actuatorOn;
14
- }
15
11
  constructor(pInfo, type) {
16
12
  super(pInfo, type);
17
- this._actuatorOn = false;
18
13
  /** @inheritDoc */
19
14
  this.targetAutomaticState = false;
20
- this._lastPersist = 0;
21
15
  /** @inheritDoc */
22
16
  this.settings = new models_1.ActuatorSettings();
23
17
  /** @inheritDoc */
24
18
  this.queuedValue = null;
19
+ this._lastPersist = 0;
20
+ this._stateNameState = 'state';
21
+ this._actuatorOn = false;
25
22
  this.deviceCapabilities.push(DeviceCapability_1.DeviceCapability.actuator);
26
23
  this.deviceCapabilities.push(DeviceCapability_1.DeviceCapability.blockAutomatic);
27
24
  this.blockAutomationHandler = new blockAutomaticHandler_1.BlockAutomaticHandler(this.restoreTargetAutomaticValue.bind(this));
28
25
  }
29
26
  /** @inheritDoc */
27
+ get actuatorOn() {
28
+ return this._actuatorOn;
29
+ }
30
+ /** @inheritDoc */
30
31
  restoreTargetAutomaticValue(c) {
31
32
  this.setActuator(new models_1.ActuatorSetStateCommand(c, this.targetAutomaticState));
32
33
  }
@@ -38,7 +39,7 @@ class ZigbeeActuator extends zigbeeDevice_1.ZigbeeDevice {
38
39
  this.queuedValue = null;
39
40
  super.update(idSplit, state, initial, true);
40
41
  switch (idSplit[3]) {
41
- case 'state':
42
+ case this._stateNameState:
42
43
  if (!handledByChildObject) {
43
44
  this.log(models_1.LogLevel.Trace, `Aktor Update für ${this.info.customName} auf ${state.val}`);
44
45
  }
@@ -49,7 +50,7 @@ class ZigbeeActuator extends zigbeeDevice_1.ZigbeeDevice {
49
50
  }
50
51
  /** @inheritDoc */
51
52
  setActuator(command) {
52
- if (this._stateIdState === '') {
53
+ if (this._actuatorOnStateIdState === '') {
53
54
  this.log(models_1.LogLevel.Error, 'Keine Switch ID bekannt.');
54
55
  return;
55
56
  }
@@ -75,7 +76,7 @@ class ZigbeeActuator extends zigbeeDevice_1.ZigbeeDevice {
75
76
  /** @inheritDoc */
76
77
  writeActuatorStateToDevice(c) {
77
78
  this.log(models_1.LogLevel.Debug, c.logMessage, services_1.LogDebugType.SetActuator);
78
- this.setState(this._stateIdState, c.stateValue, undefined, (err) => {
79
+ this.setState(this._actuatorOnStateIdState, c.stateValue, undefined, (err) => {
79
80
  this.log(models_1.LogLevel.Error, `Lampe schalten ergab Fehler: ${err}`);
80
81
  });
81
82
  }
@@ -45,7 +45,7 @@ class ZigbeeDimmer extends zigbeeLamp_1.ZigbeeLamp {
45
45
  /** @inheritDoc */
46
46
  setLight(c) {
47
47
  var _a;
48
- if (this._stateIdState === '') {
48
+ if (this._actuatorOnStateIdState === '') {
49
49
  this.log(models_1.LogLevel.Error, 'Keine State ID bekannt.');
50
50
  return;
51
51
  }
@@ -57,13 +57,13 @@ class ZigbeeDimmer extends zigbeeLamp_1.ZigbeeLamp {
57
57
  if (sharedFunctions_1.LampUtils.checkBlockActive(this, c)) {
58
58
  return;
59
59
  }
60
- if (sharedFunctions_1.LampUtils.canDimmerChangeBeSkipped(this, c)) {
61
- return;
62
- }
63
60
  if (c.isAutomaticAction) {
64
61
  // Preserve the target state for the automatic handler, as
65
62
  this.targetAutomaticState = c.on;
66
63
  }
64
+ if (sharedFunctions_1.LampUtils.canDimmerChangeBeSkipped(this, c)) {
65
+ return;
66
+ }
67
67
  if (c.transitionTime > -1) {
68
68
  this.setState(this._stateIdTransitionTime, c.transitionTime);
69
69
  }
@@ -4,8 +4,6 @@ import { LampSetLightCommand, LampSetTimeBasedCommand, LampToggleLightCommand }
4
4
  import { IoBrokerDeviceInfo } from '../../IoBrokerDeviceInfo';
5
5
  import { DeviceType } from '../../deviceType';
6
6
  export declare abstract class ZigbeeLamp extends ZigbeeActuator implements iLamp, iTemporaryDisableAutomatic {
7
- protected abstract readonly _stateNameState: string;
8
- protected _lightOn: boolean;
9
7
  constructor(pInfo: IoBrokerDeviceInfo, deviceType: DeviceType);
10
8
  /** @inheritDoc */
11
9
  get lightOn(): boolean;
@@ -8,28 +8,20 @@ const DeviceCapability_1 = require("../../DeviceCapability");
8
8
  class ZigbeeLamp extends ZigbeeActuator_1.ZigbeeActuator {
9
9
  constructor(pInfo, deviceType) {
10
10
  super(pInfo, deviceType);
11
- this._lightOn = false;
12
11
  this.deviceCapabilities.push(DeviceCapability_1.DeviceCapability.lamp);
13
12
  }
14
13
  /** @inheritDoc */
15
14
  get lightOn() {
16
- return this._lightOn;
15
+ return this.actuatorOn;
17
16
  }
18
17
  /** @inheritDoc */
19
18
  update(idSplit, state, initial = false, handledByChildObject = false) {
20
19
  if (!handledByChildObject) {
21
- this.log(models_1.LogLevel.DeepTrace, `Aktuator Update: ID: ${idSplit.join('.')} JSON: ${JSON.stringify(state)}`);
20
+ this.log(models_1.LogLevel.DeepTrace, `Lamp Update: ID: ${idSplit.join('.')} JSON: ${JSON.stringify(state)}`);
22
21
  }
23
22
  this.queuedValue = null;
24
- this.log(models_1.LogLevel.DeepTrace, `Dimmer Update: ID: ${idSplit.join('.')} JSON: ${JSON.stringify(state)}`);
23
+ this.log(models_1.LogLevel.DeepTrace, `Lamp Update: ID: ${idSplit.join('.')} JSON: ${JSON.stringify(state)}`);
25
24
  super.update(idSplit, state, initial, true);
26
- switch (idSplit[3]) {
27
- case this._stateNameState:
28
- this.log(models_1.LogLevel.Trace, `Lamp Update für ${this.info.customName} auf ${state.val}`);
29
- this._lightOn = state.val;
30
- this.persist();
31
- break;
32
- }
33
25
  }
34
26
  /** @inheritDoc */
35
27
  setTimeBased(c) {
@@ -49,7 +49,7 @@ class ZigbeeLedRGBCCT extends zigbeeDimmer_1.ZigbeeDimmer {
49
49
  }
50
50
  /** @inheritDoc */
51
51
  setLight(c) {
52
- if (this._stateIdState === '') {
52
+ if (this._actuatorOnStateIdState === '') {
53
53
  this.log(models_1.LogLevel.Error, 'Keine State ID bekannt.');
54
54
  return;
55
55
  }
@@ -6,7 +6,7 @@ import { iLoadMeter } from '../baseDeviceInterfaces/iLoadMeter';
6
6
  export declare class ZigbeeBlitzShp extends ZigbeeActuator implements iExcessEnergyConsumer, iLoadMeter {
7
7
  /** @inheritDoc */
8
8
  settings: ActuatorSettings;
9
- protected readonly _stateIdState: string;
9
+ protected readonly _actuatorOnStateIdState: string;
10
10
  private _steckerOn;
11
11
  private _current;
12
12
  private _energy;
@@ -16,7 +16,7 @@ class ZigbeeBlitzShp extends BaseDevices_1.ZigbeeActuator {
16
16
  this._loadPower = 0;
17
17
  this._availableForExcessEnergy = true;
18
18
  this._activatedByExcessEnergy = false;
19
- this._stateIdState = `${pInfo.fullID}.state`;
19
+ this._actuatorOnStateIdState = `${pInfo.fullID}.state`;
20
20
  this.settings.energySettings = new models_1.ExcessEnergyConsumerSettings();
21
21
  this.deviceCapabilities.push(DeviceCapability_1.DeviceCapability.excessEnergyConsumer);
22
22
  this.deviceCapabilities.push(DeviceCapability_1.DeviceCapability.loadMetering);
@@ -1,7 +1,7 @@
1
1
  import { ZigbeeActuator } from './BaseDevices';
2
2
  import { IoBrokerDeviceInfo } from '../IoBrokerDeviceInfo';
3
3
  export declare class ZigbeeIkeaSteckdose extends ZigbeeActuator {
4
- protected readonly _stateIdState: string;
4
+ protected readonly _actuatorOnStateIdState: string;
5
5
  constructor(pInfo: IoBrokerDeviceInfo);
6
6
  /** @inheritDoc */
7
7
  update(idSplit: string[], state: ioBroker.State, initial?: boolean): void;
@@ -7,7 +7,7 @@ const models_1 = require("../../../models");
7
7
  class ZigbeeIkeaSteckdose extends BaseDevices_1.ZigbeeActuator {
8
8
  constructor(pInfo) {
9
9
  super(pInfo, deviceType_1.DeviceType.ZigbeeIkeaSteckdose);
10
- this._stateIdState = `${pInfo.fullID}.state`;
10
+ this._actuatorOnStateIdState = `${pInfo.fullID}.state`;
11
11
  }
12
12
  /** @inheritDoc */
13
13
  update(idSplit, state, initial = false) {
@@ -2,6 +2,6 @@ import { ZigbeeActuator } from './BaseDevices';
2
2
  import { DeviceType } from '../deviceType';
3
3
  import { IoBrokerDeviceInfo } from '../IoBrokerDeviceInfo';
4
4
  export declare class ZigbeeIlluActuator extends ZigbeeActuator {
5
- protected readonly _stateIdState: string;
5
+ protected readonly _actuatorOnStateIdState: string;
6
6
  constructor(pInfo: IoBrokerDeviceInfo, deviceType?: DeviceType);
7
7
  }
@@ -6,7 +6,7 @@ const deviceType_1 = require("../deviceType");
6
6
  class ZigbeeIlluActuator extends BaseDevices_1.ZigbeeActuator {
7
7
  constructor(pInfo, deviceType = deviceType_1.DeviceType.ZigbeeIlluActuator) {
8
8
  super(pInfo, deviceType);
9
- this._stateIdState = `${pInfo.fullID}.state`;
9
+ this._actuatorOnStateIdState = `${pInfo.fullID}.state`;
10
10
  }
11
11
  }
12
12
  exports.ZigbeeIlluActuator = ZigbeeIlluActuator;
@@ -5,7 +5,7 @@ export declare class ZigbeeIlluDimmer extends ZigbeeDimmer {
5
5
  protected _stateNameState: string;
6
6
  protected _stateNameTransitionTime: string;
7
7
  protected _stateIdBrightness: string;
8
- protected _stateIdState: string;
8
+ protected _actuatorOnStateIdState: string;
9
9
  protected _stateIdTransitionTime: string;
10
10
  constructor(pInfo: IoBrokerDeviceInfo);
11
11
  }
@@ -9,7 +9,7 @@ class ZigbeeIlluDimmer extends BaseDevices_1.ZigbeeDimmer {
9
9
  this._stateNameBrightness = 'brightness';
10
10
  this._stateNameState = 'state';
11
11
  this._stateNameTransitionTime = 'transition_time';
12
- this._stateIdState = `${this.info.fullID}.state`;
12
+ this._actuatorOnStateIdState = `${this.info.fullID}.state`;
13
13
  this._stateIdBrightness = `${this.info.fullID}.brightness`;
14
14
  this._stateIdTransitionTime = `${this.info.fullID}.transition_time`;
15
15
  }
@@ -2,7 +2,7 @@ import { iLamp } from '../baseDeviceInterfaces';
2
2
  import { IoBrokerDeviceInfo } from '../IoBrokerDeviceInfo';
3
3
  import { ZigbeeLamp } from './BaseDevices';
4
4
  export declare class ZigbeeIlluLampe extends ZigbeeLamp implements iLamp {
5
- protected readonly _stateIdState: string;
5
+ protected readonly _actuatorOnStateIdState: string;
6
6
  protected readonly _stateNameState: string;
7
7
  constructor(pInfo: IoBrokerDeviceInfo);
8
8
  }
@@ -6,7 +6,7 @@ const BaseDevices_1 = require("./BaseDevices");
6
6
  class ZigbeeIlluLampe extends BaseDevices_1.ZigbeeLamp {
7
7
  constructor(pInfo) {
8
8
  super(pInfo, deviceType_1.DeviceType.ZigbeeIlluLampe);
9
- this._stateIdState = `${pInfo.fullID}.state`;
9
+ this._actuatorOnStateIdState = `${pInfo.fullID}.state`;
10
10
  this._stateNameState = `${pInfo.fullID}.state`;
11
11
  }
12
12
  }
@@ -4,7 +4,7 @@ export declare class ZigbeeIlluLedRGBCCT extends ZigbeeLedRGBCCT {
4
4
  protected readonly _stateIdBrightness: string;
5
5
  protected readonly _stateIdColor: string;
6
6
  protected readonly _stateIdColorTemp: string;
7
- protected readonly _stateIdState: string;
7
+ protected readonly _actuatorOnStateIdState: string;
8
8
  protected readonly _stateIdTransitionTime: string;
9
9
  protected readonly _stateNameBrightness: string;
10
10
  protected readonly _stateNameState: string;
@@ -14,7 +14,7 @@ class ZigbeeIlluLedRGBCCT extends BaseDevices_1.ZigbeeLedRGBCCT {
14
14
  this._stateIdBrightness = `${this.info.fullID}.brightness`;
15
15
  this._stateIdColor = `${this.info.fullID}.color`;
16
16
  this._stateIdColorTemp = `${this.info.fullID}.colortemp`;
17
- this._stateIdState = `${this.info.fullID}.state`;
17
+ this._actuatorOnStateIdState = `${this.info.fullID}.state`;
18
18
  this._stateIdTransitionTime = `${this.info.fullID}.transition_time`;
19
19
  }
20
20
  }
@@ -4,7 +4,7 @@ export declare class ZigbeeInnr142C extends ZigbeeLedRGBCCT {
4
4
  protected readonly _stateIdBrightness: string;
5
5
  protected readonly _stateIdColor: string;
6
6
  protected readonly _stateIdColorTemp: string;
7
- protected readonly _stateIdState: string;
7
+ protected readonly _actuatorOnStateIdState: string;
8
8
  protected readonly _stateIdTransitionTime: string;
9
9
  protected readonly _stateNameBrightness: string;
10
10
  protected readonly _stateNameState: string;
@@ -15,7 +15,7 @@ class ZigbeeInnr142C extends BaseDevices_1.ZigbeeLedRGBCCT {
15
15
  this._stateIdBrightness = `${this.info.fullID}.brightness`;
16
16
  this._stateIdColor = `${this.info.fullID}.color`;
17
17
  this._stateIdColorTemp = `${this.info.fullID}.colortemp`;
18
- this._stateIdState = `${this.info.fullID}.state`;
18
+ this._actuatorOnStateIdState = `${this.info.fullID}.state`;
19
19
  this._stateIdTransitionTime = `${this.info.fullID}.transition_time`;
20
20
  }
21
21
  }
@@ -4,7 +4,7 @@ export declare class ZigbeeLinkindLedRgbCct extends ZigbeeLedRGBCCT {
4
4
  protected readonly _stateIdBrightness: string;
5
5
  protected readonly _stateIdColor: string;
6
6
  protected readonly _stateIdColorTemp: string;
7
- protected readonly _stateIdState: string;
7
+ protected readonly _actuatorOnStateIdState: string;
8
8
  protected readonly _stateIdTransitionTime: string;
9
9
  protected readonly _stateNameBrightness: string;
10
10
  protected readonly _stateNameState: string;
@@ -14,7 +14,7 @@ class ZigbeeLinkindLedRgbCct extends BaseDevices_1.ZigbeeLedRGBCCT {
14
14
  this._stateIdBrightness = `${this.info.fullID}.brightness`;
15
15
  this._stateIdColor = `${this.info.fullID}.color`;
16
16
  this._stateIdColorTemp = `${this.info.fullID}.colortemp`;
17
- this._stateIdState = `${this.info.fullID}.state`;
17
+ this._actuatorOnStateIdState = `${this.info.fullID}.state`;
18
18
  this._stateIdTransitionTime = `${this.info.fullID}.transition_time`;
19
19
  }
20
20
  }
@@ -5,7 +5,7 @@ export declare class ZigbeeOsramDimmer extends ZigbeeDimmer {
5
5
  protected _stateNameState: string;
6
6
  protected _stateNameTransitionTime: string;
7
7
  protected _stateIdBrightness: string;
8
- protected _stateIdState: string;
8
+ protected _actuatorOnStateIdState: string;
9
9
  protected _stateIdTransitionTime: string;
10
10
  constructor(pInfo: IoBrokerDeviceInfo);
11
11
  }
@@ -9,7 +9,7 @@ class ZigbeeOsramDimmer extends BaseDevices_1.ZigbeeDimmer {
9
9
  this._stateNameBrightness = 'brightness';
10
10
  this._stateNameState = 'state';
11
11
  this._stateNameTransitionTime = 'transition_time';
12
- this._stateIdState = `${this.info.fullID}.state`;
12
+ this._actuatorOnStateIdState = `${this.info.fullID}.state`;
13
13
  this._stateIdBrightness = `${this.info.fullID}.brightness`;
14
14
  this._stateIdTransitionTime = `${this.info.fullID}.transition_time`;
15
15
  }
@@ -4,7 +4,7 @@ import { IoBrokerDeviceInfo } from '../IoBrokerDeviceInfo';
4
4
  import { iLoadMeter } from '../baseDeviceInterfaces/iLoadMeter';
5
5
  export declare class ZigbeeUbisysActuator extends ZigbeeActuator implements iLoadMeter {
6
6
  private _loadPower;
7
- protected readonly _stateIdState: string;
7
+ protected readonly _actuatorOnStateIdState: string;
8
8
  /**
9
9
  * Creates an instance of {@link DeviceType.ZigbeeUbisysActuator} or a derived class like {@link ZigbeeUbisysLampe}
10
10
  * @param pInfo - Device creation information
@@ -15,7 +15,7 @@ class ZigbeeUbisysActuator extends BaseDevices_1.ZigbeeActuator {
15
15
  super(pInfo, deviceType);
16
16
  this._loadPower = 0;
17
17
  this.deviceCapabilities.push(DeviceCapability_1.DeviceCapability.loadMetering);
18
- this._stateIdState = `${pInfo.fullID}.state`;
18
+ this._actuatorOnStateIdState = `${pInfo.fullID}.state`;
19
19
  }
20
20
  /** @inheritDoc */
21
21
  get loadPower() {
@@ -3,7 +3,7 @@ import { IoBrokerDeviceInfo } from '../IoBrokerDeviceInfo';
3
3
  import { ZigbeeLamp } from './BaseDevices';
4
4
  import { iLoadMeter } from '../baseDeviceInterfaces/iLoadMeter';
5
5
  export declare class ZigbeeUbisysLampe extends ZigbeeLamp implements iLamp, iLoadMeter {
6
- protected readonly _stateIdState: string;
6
+ protected readonly _actuatorOnStateIdState: string;
7
7
  protected readonly _stateNameState: string;
8
8
  private _loadPower;
9
9
  constructor(pInfo: IoBrokerDeviceInfo);
@@ -10,7 +10,7 @@ class ZigbeeUbisysLampe extends BaseDevices_1.ZigbeeLamp {
10
10
  super(pInfo, deviceType_1.DeviceType.ZigbeeUbisysLampe);
11
11
  this._loadPower = 0;
12
12
  this.deviceCapabilities.push(DeviceCapability_1.DeviceCapability.loadMetering);
13
- this._stateIdState = `${pInfo.fullID}.state`;
13
+ this._actuatorOnStateIdState = `${pInfo.fullID}.state`;
14
14
  this._stateNameState = `${pInfo.fullID}.state`;
15
15
  }
16
16
  /** @inheritDoc */
@@ -117,13 +117,13 @@ class OwnGoveeDevice {
117
117
  if (devices_1.LampUtils.checkBlockActive(this, c)) {
118
118
  return;
119
119
  }
120
- if (devices_1.LampUtils.canDimmerChangeBeSkipped(this, c)) {
121
- return;
122
- }
123
120
  if (c.isAutomaticAction) {
124
121
  // Preserve the target state for the automatic handler, as
125
122
  this.targetAutomaticState = c.on;
126
123
  }
124
+ if (devices_1.LampUtils.canDimmerChangeBeSkipped(this, c)) {
125
+ return;
126
+ }
127
127
  if (c.brightness > -1 && c.on) {
128
128
  this.setBrightness(c.brightness, () => {
129
129
  this.turnOn();