hoffmation-base 3.2.10-alpha.1 → 3.2.10-alpha.3
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.
|
@@ -13,14 +13,16 @@ class Window extends base_group_1.BaseGroup {
|
|
|
13
13
|
* @returns {number} The level (0 closed, 100 open)
|
|
14
14
|
*/
|
|
15
15
|
get desiredPosition() {
|
|
16
|
-
|
|
16
|
+
var _a, _b;
|
|
17
|
+
return (_b = (_a = this.getShutter()) === null || _a === void 0 ? void 0 : _a.baseAutomaticLevel) !== null && _b !== void 0 ? _b : 0;
|
|
17
18
|
}
|
|
18
19
|
/**
|
|
19
20
|
* Checks if any shutter is down (0%)
|
|
20
21
|
* @returns {boolean} true if any shutter is down
|
|
21
22
|
*/
|
|
22
23
|
get anyShutterDown() {
|
|
23
|
-
|
|
24
|
+
var _a;
|
|
25
|
+
return ((_a = this.getShutter()) === null || _a === void 0 ? void 0 : _a.currentLevel) === 0;
|
|
24
26
|
}
|
|
25
27
|
constructor(roomName, handleIds = [], vibrationIds = [], shutterIds = [], magnetIds = []) {
|
|
26
28
|
super(roomName, enums_1.GroupType.Window);
|
|
@@ -88,11 +90,12 @@ class Window extends base_group_1.BaseGroup {
|
|
|
88
90
|
(_a = this.getShutter()) === null || _a === void 0 ? void 0 : _a.setLevel(new command_1.ShutterSetLevelCommand(enums_1.CommandSource.Force, services_1.TimeCallbackService.darkOutsideOrNight(timeOfDay) ? 50 : 100, 'Window ajar by handle'));
|
|
89
91
|
});
|
|
90
92
|
griff.addOffenCallback((offen) => {
|
|
93
|
+
var _a;
|
|
91
94
|
if (offen) {
|
|
92
95
|
this.getVibration().forEach((element) => {
|
|
93
96
|
element.vibrationBlockedByHandle = true;
|
|
94
97
|
});
|
|
95
|
-
this.getShutter().setLevel(new command_1.ShutterSetLevelCommand(enums_1.CommandSource.Force, 100, 'Window opened by handle'));
|
|
98
|
+
(_a = this.getShutter()) === null || _a === void 0 ? void 0 : _a.setLevel(new command_1.ShutterSetLevelCommand(enums_1.CommandSource.Force, 100, 'Window opened by handle'));
|
|
96
99
|
return;
|
|
97
100
|
}
|
|
98
101
|
});
|
|
@@ -28,6 +28,7 @@ class ShutterUtils {
|
|
|
28
28
|
![enums_1.TimeOfDay.Night, enums_1.TimeOfDay.AfterSunset].includes(services_1.TimeCallbackService.dayType(device.room.settings.rolloOffset))) {
|
|
29
29
|
// First manual up command of the day on a window with no automatic up.
|
|
30
30
|
device.baseAutomaticLevel = 100;
|
|
31
|
+
device.targetAutomaticValue = 100;
|
|
31
32
|
}
|
|
32
33
|
else if (c.isManual &&
|
|
33
34
|
c.level === 0 &&
|
|
@@ -37,6 +38,7 @@ class ShutterUtils {
|
|
|
37
38
|
[enums_1.TimeOfDay.Night, enums_1.TimeOfDay.AfterSunset].includes(services_1.TimeCallbackService.dayType(device.room.settings.rolloOffset))) {
|
|
38
39
|
// First manual down command of the day on a window with no automatic up.
|
|
39
40
|
device.baseAutomaticLevel = 0;
|
|
41
|
+
device.targetAutomaticValue = 0;
|
|
40
42
|
}
|
|
41
43
|
let pPosition = c.level;
|
|
42
44
|
if (!device.firstCommandRecieved && !c.isInitial) {
|