hoffmation-base 3.0.0-alpha.65 → 3.0.0-alpha.67
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/WindowSetDesiredPositionCommand.d.ts +3 -1
- package/lib/models/command/WindowSetDesiredPositionCommand.js +3 -1
- package/lib/server/devices/groups/windowGroup.js +8 -3
- package/lib/server/devices/smartGarden/smartGardenMower.js +2 -2
- package/lib/server/devices/smartGarden/smartGardenValve.js +2 -2
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -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
|
-
|
|
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
|
}
|
|
@@ -19,7 +19,7 @@ class SmartGardenMower extends smartGardenDevice_1.SmartGardenDevice {
|
|
|
19
19
|
this.queuedValue = null;
|
|
20
20
|
this._lastPersist = 0;
|
|
21
21
|
this._actuatorOn = false;
|
|
22
|
-
this._activityControlStateId = `${pInfo.fullID}.SERVICE_MOWER_${this._deviceSerial}
|
|
22
|
+
this._activityControlStateId = `${pInfo.fullID}.SERVICE_MOWER_${this._deviceSerial}.activity_control_i`;
|
|
23
23
|
this.deviceCapabilities.push(DeviceCapability_1.DeviceCapability.actuator);
|
|
24
24
|
this.deviceCapabilities.push(DeviceCapability_1.DeviceCapability.blockAutomatic);
|
|
25
25
|
this.blockAutomationHandler = new blockAutomaticHandler_1.BlockAutomaticHandler(this.restoreTargetAutomaticValue.bind(this), this.log.bind(this));
|
|
@@ -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 '
|
|
46
|
+
case 'activity_moving_i':
|
|
47
47
|
this._actuatorOn = state.val;
|
|
48
48
|
this.persist();
|
|
49
49
|
break;
|
|
@@ -20,8 +20,8 @@ class SmartGardenValve extends smartGardenDevice_1.SmartGardenDevice {
|
|
|
20
20
|
this.queuedValue = null;
|
|
21
21
|
this._lastPersist = 0;
|
|
22
22
|
this._actuatorOn = false;
|
|
23
|
-
this._durationValueStateId = `${pInfo.fullID}.SERVICE_VALVE_${this._deviceSerial}
|
|
24
|
-
this._stopAllValvesStateId = `${pInfo.fullID}.SERVICE_VALVE_SET_${this._deviceSerial}
|
|
23
|
+
this._durationValueStateId = `${pInfo.fullID}.SERVICE_VALVE_${this._deviceSerial}.duration_value`;
|
|
24
|
+
this._stopAllValvesStateId = `${pInfo.fullID}.SERVICE_VALVE_SET_${this._deviceSerial}.stop_all_valves_i`;
|
|
25
25
|
this.deviceCapabilities.push(DeviceCapability_1.DeviceCapability.actuator);
|
|
26
26
|
this.deviceCapabilities.push(DeviceCapability_1.DeviceCapability.blockAutomatic);
|
|
27
27
|
this.blockAutomationHandler = new blockAutomaticHandler_1.BlockAutomaticHandler(this.restoreTargetAutomaticValue.bind(this), this.log.bind(this));
|