hoffmation-base 3.0.0-alpha.65 → 3.0.0-alpha.66

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.
@@ -3,6 +3,7 @@ import { CommandSource } from './commandSource';
3
3
  import { CommandType } from './commandType';
4
4
  export declare class WindowSetDesiredPositionCommand extends BaseCommand {
5
5
  readonly position: number;
6
+ readonly applyNewPosition: boolean;
6
7
  /** @inheritDoc */
7
8
  type: CommandType;
8
9
  /**
@@ -10,6 +11,7 @@ export declare class WindowSetDesiredPositionCommand extends BaseCommand {
10
11
  * @param source - The source of the command
11
12
  * @param position - The desired position of the shutter (0 closed, 100 open)
12
13
  * @param reason - You can provide a reason for clarification
14
+ * @param applyNewPosition - Whether this new position should be applied immediately
13
15
  */
14
- constructor(source: CommandSource | BaseCommand, position: number, reason?: string);
16
+ constructor(source: CommandSource | BaseCommand, position: number, reason?: string, applyNewPosition?: boolean);
15
17
  }
@@ -9,10 +9,12 @@ class WindowSetDesiredPositionCommand extends baseCommand_1.BaseCommand {
9
9
  * @param source - The source of the command
10
10
  * @param position - The desired position of the shutter (0 closed, 100 open)
11
11
  * @param reason - You can provide a reason for clarification
12
+ * @param applyNewPosition - Whether this new position should be applied immediately
12
13
  */
13
- constructor(source, position, reason = '') {
14
+ constructor(source, position, reason = '', applyNewPosition = true) {
14
15
  super(source, reason);
15
16
  this.position = position;
17
+ this.applyNewPosition = applyNewPosition;
16
18
  /** @inheritDoc */
17
19
  this.type = commandType_1.CommandType.WindowSetDesiredPositionCommand;
18
20
  }
@@ -181,9 +181,14 @@ class WindowGroup extends base_group_1.BaseGroup {
181
181
  }
182
182
  this.sunriseUp(new models_1.ShutterSunriseUpCommand(models_1.CommandSource.Automatic, 'Time-Callback fired'));
183
183
  }, room.settings.rolloOffset.sunrise, undefined, undefined, room.settings.rolloOffset);
184
- if (!services_1.TimeCallbackService.darkOutsideOrNight(services_1.TimeCallbackService.dayType(room.settings.rolloOffset)) &&
185
- this.anyShutterDown) {
186
- this.sunriseUp(new models_1.ShutterSunriseUpCommand(models_1.CommandSource.Initial, 'Initial sunrise up as it is day and at least 1 shutter is down.'));
184
+ if (!services_1.TimeCallbackService.darkOutsideOrNight(services_1.TimeCallbackService.dayType(room.settings.rolloOffset))) {
185
+ if (!this.anyShutterDown) {
186
+ // Only set new desired position without applying it.
187
+ this.setDesiredPosition(new models_1.WindowSetDesiredPositionCommand(models_1.CommandSource.Initial, 100, 'It is daytime during restart.', false));
188
+ }
189
+ else {
190
+ this.sunriseUp(new models_1.ShutterSunriseUpCommand(models_1.CommandSource.Initial, 'Initial sunrise up as it is day and at least 1 shutter is down.'));
191
+ }
187
192
  }
188
193
  services_1.TimeCallbackService.addCallback(this.sunriseShutterCallback);
189
194
  }
@@ -43,7 +43,7 @@ class SmartGardenMower extends smartGardenDevice_1.SmartGardenDevice {
43
43
  const stateName = idSplit[5];
44
44
  if (folder.indexOf('SERVICE_MOWER') === 0) {
45
45
  switch (stateName) {
46
- case 'activity_value':
46
+ case 'activity_moving_i':
47
47
  this._actuatorOn = state.val;
48
48
  this.persist();
49
49
  break;