hoffmation-base 2.22.18 → 3.0.0-alpha.0
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/ShutterSetLevelCommand.d.ts +10 -0
- package/lib/models/command/ShutterSetLevelCommand.js +17 -0
- package/lib/models/command/WindowRestoreDesiredPositionCommand.d.ts +7 -0
- package/lib/models/command/WindowRestoreDesiredPositionCommand.js +12 -0
- package/lib/models/command/WindowSetDesiredPositionCommand.d.ts +8 -0
- package/lib/models/command/WindowSetDesiredPositionCommand.js +13 -0
- package/lib/models/command/WindowSetRolloByWeatherStatusCommand.d.ts +7 -0
- package/lib/models/command/WindowSetRolloByWeatherStatusCommand.js +12 -0
- package/lib/models/command/actuatorSetStateCommand.d.ts +13 -0
- package/lib/models/command/actuatorSetStateCommand.js +22 -0
- package/lib/models/command/actuatorToggleCommand.d.ts +8 -0
- package/lib/models/command/actuatorToggleCommand.js +15 -0
- package/lib/models/command/actuatorWriteStateToDeviceCommand.d.ts +9 -0
- package/lib/models/command/actuatorWriteStateToDeviceCommand.js +16 -0
- package/lib/models/command/baseCommand.d.ts +12 -0
- package/lib/models/command/baseCommand.js +34 -0
- package/lib/models/command/commandSource.d.ts +8 -0
- package/lib/models/command/commandSource.js +12 -0
- package/lib/models/command/commandType.d.ts +23 -0
- package/lib/models/command/commandType.js +27 -0
- package/lib/models/command/dimmerSetLightCommand.d.ts +22 -0
- package/lib/models/command/dimmerSetLightCommand.js +40 -0
- package/lib/models/command/floorSetAllShuttersCommand.d.ts +16 -0
- package/lib/models/command/floorSetAllShuttersCommand.js +21 -0
- package/lib/models/command/index.d.ts +24 -0
- package/lib/models/command/index.js +51 -0
- package/lib/models/command/lampSetLightCommand.d.ts +9 -0
- package/lib/models/command/lampSetLightCommand.js +15 -0
- package/lib/models/command/lampSetTimeBasedCommand.d.ts +18 -0
- package/lib/models/command/lampSetTimeBasedCommand.js +25 -0
- package/lib/models/command/lampToggleLightCommand.d.ts +19 -0
- package/lib/models/command/lampToggleLightCommand.js +24 -0
- package/lib/models/command/ledSetLightCommand.d.ts +25 -0
- package/lib/models/command/ledSetLightCommand.js +41 -0
- package/lib/models/command/lightGroupSwitchTimeConditionalCommand.d.ts +9 -0
- package/lib/models/command/lightGroupSwitchTimeConditionalCommand.js +13 -0
- package/lib/models/command/restoreTargetAutomaticValueCommand.d.ts +8 -0
- package/lib/models/command/restoreTargetAutomaticValueCommand.js +15 -0
- package/lib/models/command/roomRestoreLightCommand.d.ts +7 -0
- package/lib/models/command/roomRestoreLightCommand.js +12 -0
- package/lib/models/command/roomRestoreShutterPositionCommand.d.ts +8 -0
- package/lib/models/command/roomRestoreShutterPositionCommand.js +13 -0
- package/lib/models/command/roomSetLightTimeBasedCommand.d.ts +14 -0
- package/lib/models/command/roomSetLightTimeBasedCommand.js +19 -0
- package/lib/models/command/shutterSunriseUpCommand.d.ts +7 -0
- package/lib/models/command/shutterSunriseUpCommand.js +12 -0
- package/lib/models/command/shutterSunsetDownCommand.d.ts +7 -0
- package/lib/models/command/shutterSunsetDownCommand.js +12 -0
- package/lib/models/command/wledSetLightCommand.d.ts +12 -0
- package/lib/models/command/wledSetLightCommand.js +28 -0
- package/lib/models/index.d.ts +1 -0
- package/lib/models/index.js +1 -0
- package/lib/models/rooms/RoomBase.d.ts +2 -2
- package/lib/models/rooms/RoomBase.js +5 -5
- package/lib/models/rooms/iRoomBase.d.ts +2 -5
- package/lib/server/devices/baseDeviceInterfaces/iActuator.d.ts +5 -6
- package/lib/server/devices/baseDeviceInterfaces/iDimmableLamp.d.ts +3 -8
- package/lib/server/devices/baseDeviceInterfaces/iLamp.d.ts +6 -16
- package/lib/server/devices/baseDeviceInterfaces/iLedRgbCct.d.ts +2 -16
- package/lib/server/devices/baseDeviceInterfaces/iShutter.d.ts +2 -2
- package/lib/server/devices/baseDeviceInterfaces/iTemporaryDisableAutomatic.d.ts +2 -1
- package/lib/server/devices/dachs/dachs.d.ts +5 -4
- package/lib/server/devices/dachs/dachs.js +13 -21
- package/lib/server/devices/groups/Window.d.ts +3 -3
- package/lib/server/devices/groups/Window.js +9 -15
- package/lib/server/devices/groups/lightGroup.d.ts +9 -7
- package/lib/server/devices/groups/lightGroup.js +46 -40
- package/lib/server/devices/groups/presenceGroup.js +2 -2
- package/lib/server/devices/groups/tasterGroup.js +22 -6
- package/lib/server/devices/groups/windowGroup.d.ts +5 -7
- package/lib/server/devices/groups/windowGroup.js +25 -43
- package/lib/server/devices/hmIPDevices/hmIpLampe.d.ts +8 -7
- package/lib/server/devices/hmIPDevices/hmIpLampe.js +19 -31
- package/lib/server/devices/hmIPDevices/hmIpRoll.d.ts +2 -2
- package/lib/server/devices/hmIPDevices/hmIpRoll.js +17 -15
- package/lib/server/devices/sharedFunctions/lampUtils.d.ts +8 -7
- package/lib/server/devices/sharedFunctions/lampUtils.js +47 -27
- package/lib/server/devices/wledDevice.d.ts +9 -8
- package/lib/server/devices/wledDevice.js +37 -52
- package/lib/server/devices/zigbee/BaseDevices/ZigbeeActuator.d.ts +5 -4
- package/lib/server/devices/zigbee/BaseDevices/ZigbeeActuator.js +13 -21
- package/lib/server/devices/zigbee/BaseDevices/zigbeeDimmer.d.ts +8 -12
- package/lib/server/devices/zigbee/BaseDevices/zigbeeDimmer.js +32 -45
- package/lib/server/devices/zigbee/BaseDevices/zigbeeLedRGBCCT.d.ts +3 -3
- package/lib/server/devices/zigbee/BaseDevices/zigbeeLedRGBCCT.js +11 -32
- package/lib/server/devices/zigbee/BaseDevices/zigbeeShutter.d.ts +2 -2
- package/lib/server/devices/zigbee/BaseDevices/zigbeeShutter.js +9 -7
- package/lib/server/devices/zigbee/zigbeeBlitzShp.js +2 -2
- package/lib/server/devices/zigbee/zigbeeHeimanSmoke.js +1 -1
- package/lib/server/devices/zigbee/zigbeeIlluActuator.d.ts +0 -2
- package/lib/server/devices/zigbee/zigbeeIlluActuator.js +0 -6
- package/lib/server/devices/zigbee/zigbeeIlluLampe.d.ts +4 -4
- package/lib/server/devices/zigbee/zigbeeIlluLampe.js +6 -11
- package/lib/server/devices/zigbee/zigbeeInnr142C.d.ts +0 -4
- package/lib/server/devices/zigbee/zigbeeInnr142C.js +0 -33
- package/lib/server/devices/zigbee/zigbeeUbisysActuator.d.ts +0 -2
- package/lib/server/devices/zigbee/zigbeeUbisysActuator.js +0 -6
- package/lib/server/devices/zigbee/zigbeeUbisysLampe.d.ts +4 -4
- package/lib/server/devices/zigbee/zigbeeUbisysLampe.js +6 -11
- package/lib/server/services/ShutterService.d.ts +2 -7
- package/lib/server/services/ShutterService.js +2 -26
- package/lib/server/services/Telegram/telegram-Commands.js +2 -1
- package/lib/server/services/ac/daikin-service.d.ts +1 -1
- package/lib/server/services/ac/daikin-service.js +7 -2
- package/lib/server/services/ac/own-daikin-device.d.ts +3 -2
- package/lib/server/services/ac/own-daikin-device.js +4 -3
- package/lib/server/services/api/api-service.js +6 -6
- package/lib/server/services/blockAutomaticHandler.d.ts +2 -2
- package/lib/server/services/blockAutomaticHandler.js +5 -3
- package/lib/server/services/govee/own-govee-device.d.ts +8 -7
- package/lib/server/services/govee/own-govee-device.js +36 -47
- package/lib/server/services/room-service/room-service.d.ts +6 -10
- package/lib/server/services/room-service/room-service.js +19 -25
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +21 -20
|
@@ -23,11 +23,10 @@ class Window extends base_group_1.BaseGroup {
|
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
25
|
* sets the desired Pos and moves rollo to this level
|
|
26
|
-
* @param {number} value
|
|
27
26
|
*/
|
|
28
|
-
setDesiredPosition(
|
|
29
|
-
this.desiredPosition =
|
|
30
|
-
this.restoreDesiredPosition();
|
|
27
|
+
setDesiredPosition(c) {
|
|
28
|
+
this.desiredPosition = c.position;
|
|
29
|
+
this.restoreDesiredPosition(new models_2.WindowRestoreDesiredPositionCommand(c));
|
|
31
30
|
}
|
|
32
31
|
getHandle() {
|
|
33
32
|
return this.deviceCluster.getIoBrokerDevicesByType(device_cluster_type_1.DeviceClusterType.Handle);
|
|
@@ -60,19 +59,14 @@ class Window extends base_group_1.BaseGroup {
|
|
|
60
59
|
element.vibrationBlockedByGriff = true;
|
|
61
60
|
});
|
|
62
61
|
const timeOfDay = services_1.TimeCallbackService.dayType(this.getRoom().settings.rolloOffset);
|
|
63
|
-
|
|
64
|
-
services_1.ShutterService.windowAllMiddle(this);
|
|
65
|
-
}
|
|
66
|
-
else {
|
|
67
|
-
services_1.ShutterService.windowAllUp(this);
|
|
68
|
-
}
|
|
62
|
+
services_1.ShutterService.windowAllToPosition(this, new models_2.ShutterSetLevelCommand(models_2.CommandSource.Automatic, services_1.TimeCallbackService.darkOutsideOrNight(timeOfDay) ? 50 : 100, 'Window ajar by handle'));
|
|
69
63
|
});
|
|
70
64
|
griff.addOffenCallback((offen) => {
|
|
71
65
|
if (offen) {
|
|
72
66
|
this.getVibration().forEach((element) => {
|
|
73
67
|
element.vibrationBlockedByGriff = true;
|
|
74
68
|
});
|
|
75
|
-
services_1.ShutterService.
|
|
69
|
+
services_1.ShutterService.windowAllToPosition(this, new models_2.ShutterSetLevelCommand(models_2.CommandSource.Automatic, 100, 'Window opened by handle'));
|
|
76
70
|
return;
|
|
77
71
|
}
|
|
78
72
|
});
|
|
@@ -89,7 +83,7 @@ class Window extends base_group_1.BaseGroup {
|
|
|
89
83
|
}
|
|
90
84
|
}, 12000);
|
|
91
85
|
});
|
|
92
|
-
this.restoreDesiredPosition();
|
|
86
|
+
this.restoreDesiredPosition(new models_2.WindowRestoreDesiredPositionCommand(models_2.CommandSource.Automatic, 'Last window Handle closed'));
|
|
93
87
|
}
|
|
94
88
|
});
|
|
95
89
|
});
|
|
@@ -105,11 +99,11 @@ class Window extends base_group_1.BaseGroup {
|
|
|
105
99
|
rolloPositionChange(pValue) {
|
|
106
100
|
this.log(models_2.LogLevel.Debug, `Rollo Position Change in ${this.roomName} to ${pValue}`, pValue == this.desiredPosition ? services_1.LogDebugType.None : services_1.LogDebugType.ShutterPositionChange);
|
|
107
101
|
if (pValue === 0 || pValue === 100) {
|
|
108
|
-
this.getRoom().setLightTimeBased(true);
|
|
102
|
+
this.getRoom().setLightTimeBased(new models_2.RoomSetLightTimeBasedCommand(models_2.CommandSource.Automatic, true, 'Window.rolloPositionChange'));
|
|
109
103
|
}
|
|
110
104
|
}
|
|
111
|
-
restoreDesiredPosition() {
|
|
112
|
-
services_1.ShutterService.windowAllToPosition(this, this.desiredPosition
|
|
105
|
+
restoreDesiredPosition(c) {
|
|
106
|
+
services_1.ShutterService.windowAllToPosition(this, new models_2.ShutterSetLevelCommand(c, this.desiredPosition));
|
|
113
107
|
}
|
|
114
108
|
}
|
|
115
109
|
exports.Window = Window;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseGroup } from './base-group';
|
|
2
2
|
import { iActuator, iLamp } from '../baseDeviceInterfaces';
|
|
3
|
-
import { TimeCallback, TimeOfDay } from '../../../models';
|
|
3
|
+
import { ActuatorSetStateCommand, LampSetLightCommand, LampSetTimeBasedCommand, LedSetLightCommand, LightGroupSwitchTimeConditionalCommand, TimeCallback, TimeOfDay, WledSetLightCommand } from '../../../models';
|
|
4
4
|
import { WledDevice } from '../wledDevice';
|
|
5
5
|
import { iLedRgbCct } from '../baseDeviceInterfaces/iLedRgbCct';
|
|
6
6
|
export declare class LightGroup extends BaseGroup {
|
|
@@ -15,12 +15,14 @@ export declare class LightGroup extends BaseGroup {
|
|
|
15
15
|
getOutlets(): iActuator[];
|
|
16
16
|
getAllAsActuator(): iActuator[];
|
|
17
17
|
handleSunriseOff(): void;
|
|
18
|
-
switchAll(
|
|
19
|
-
switchTimeConditional(
|
|
20
|
-
setAllLampen(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
switchAll(c: ActuatorSetStateCommand): void;
|
|
19
|
+
switchTimeConditional(c: LightGroupSwitchTimeConditionalCommand): void;
|
|
20
|
+
setAllLampen(c: LampSetLightCommand): void;
|
|
21
|
+
setAllLampenTimeBased(c: LampSetTimeBasedCommand): void;
|
|
22
|
+
setAllactuator(c: ActuatorSetStateCommand): void;
|
|
23
|
+
setAllActuatorsTimeBased(time: TimeOfDay): void;
|
|
24
|
+
setAllLED(c: LedSetLightCommand): void;
|
|
25
|
+
setAllWled(c: WledSetLightCommand): void;
|
|
24
26
|
initialize(): void;
|
|
25
27
|
recalculateTimeCallbacks(): void;
|
|
26
28
|
private reconfigureSunriseTimeCallback;
|
|
@@ -65,85 +65,91 @@ class LightGroup extends base_group_1.BaseGroup {
|
|
|
65
65
|
return;
|
|
66
66
|
}
|
|
67
67
|
this.log(models_1.LogLevel.Info, `Es ist hell genug --> Schalte Lampen im ${this.roomName} aus`);
|
|
68
|
-
this.switchAll(false);
|
|
68
|
+
this.switchAll(new models_1.ActuatorSetStateCommand(models_1.CommandSource.Automatic, false, 'LightGroup handleSunriseOff'));
|
|
69
69
|
}
|
|
70
|
-
switchAll(
|
|
70
|
+
switchAll(c) {
|
|
71
71
|
this.getAllAsActuator().forEach((a) => {
|
|
72
|
-
if (a.settings.includeInAmbientLight && !
|
|
72
|
+
if (a.settings.includeInAmbientLight && !c.isForceAction && !c.on && this._ambientLightOn) {
|
|
73
73
|
a.log(models_1.LogLevel.Info, `Ambient light mode is active --> Skip non force light off command in ${this.roomName}`);
|
|
74
74
|
return;
|
|
75
75
|
}
|
|
76
|
-
a.setActuator(
|
|
76
|
+
a.setActuator(c);
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
|
-
switchTimeConditional(
|
|
80
|
-
const darkOutside = services_1.TimeCallbackService.darkOutsideOrNight(time);
|
|
79
|
+
switchTimeConditional(c) {
|
|
80
|
+
const darkOutside = services_1.TimeCallbackService.darkOutsideOrNight(c.time);
|
|
81
81
|
let resultLampen = false;
|
|
82
82
|
let resultSteckdosen = false;
|
|
83
83
|
let activatedGroups = 0;
|
|
84
|
+
const command = new models_1.LampSetTimeBasedCommand(c, c.time, 'LightGroup switchTimeConditional');
|
|
84
85
|
if (this.getWled().length > 0) {
|
|
85
86
|
activatedGroups++;
|
|
86
|
-
this.log(models_1.LogLevel.Debug, `Set Wled time based for time "${models_1.TimeOfDay[time]}"`);
|
|
87
|
+
this.log(models_1.LogLevel.Debug, `Set Wled time based for time "${models_1.TimeOfDay[c.time]}"`);
|
|
87
88
|
this.getWled().forEach((wled) => {
|
|
88
|
-
wled.setTimeBased(
|
|
89
|
+
wled.setTimeBased(command);
|
|
89
90
|
});
|
|
90
91
|
}
|
|
91
92
|
if (this.getLED().length > 0) {
|
|
92
93
|
activatedGroups++;
|
|
93
|
-
this.log(models_1.LogLevel.Trace, `Set LEDs time based for time "${models_1.TimeOfDay[time]}"`);
|
|
94
|
+
this.log(models_1.LogLevel.Trace, `Set LEDs time based for time "${models_1.TimeOfDay[c.time]}"`);
|
|
94
95
|
this.getLED().forEach((s) => {
|
|
95
|
-
s.setTimeBased(
|
|
96
|
+
s.setTimeBased(command);
|
|
96
97
|
});
|
|
97
98
|
}
|
|
98
99
|
if (this.getOutlets().length > 0) {
|
|
99
100
|
activatedGroups++;
|
|
100
|
-
this.log(models_1.LogLevel.Trace, `Set outlets time based for time "${models_1.TimeOfDay[time]}"`);
|
|
101
|
+
this.log(models_1.LogLevel.Trace, `Set outlets time based for time "${models_1.TimeOfDay[c.time]}"`);
|
|
101
102
|
resultSteckdosen = darkOutside;
|
|
102
103
|
}
|
|
103
104
|
if (activatedGroups === 0 || this.getRoom().settings.includeLampsInNormalMovementLightning) {
|
|
104
|
-
this.log(models_1.LogLevel.Trace, `Set Lamps time based for time "${models_1.TimeOfDay[time]}"`);
|
|
105
|
+
this.log(models_1.LogLevel.Trace, `Set Lamps time based for time "${models_1.TimeOfDay[c.time]}"`);
|
|
105
106
|
resultLampen = darkOutside;
|
|
106
107
|
}
|
|
107
|
-
|
|
108
|
-
|
|
108
|
+
if (resultLampen) {
|
|
109
|
+
this.setAllLampenTimeBased(new models_1.LampSetTimeBasedCommand(models_1.CommandSource.Automatic, c.time, 'LightGroup switchTimeConditional'));
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
this.setAllLampen(new models_1.LampSetLightCommand(models_1.CommandSource.Automatic, false, 'LightGroup switchTimeConditional --> off'));
|
|
113
|
+
}
|
|
114
|
+
if (resultSteckdosen) {
|
|
115
|
+
this.setAllActuatorsTimeBased(c.time);
|
|
116
|
+
}
|
|
117
|
+
else {
|
|
118
|
+
this.setAllactuator(new models_1.ActuatorSetStateCommand(models_1.CommandSource.Automatic, false, 'LightGroup switchTimeConditional --> off'));
|
|
119
|
+
}
|
|
109
120
|
}
|
|
110
|
-
setAllLampen(
|
|
121
|
+
setAllLampen(c) {
|
|
111
122
|
this.getLights().forEach((s) => {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
}
|
|
124
|
-
}
|
|
123
|
+
s.setLight(c);
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
setAllLampenTimeBased(c) {
|
|
127
|
+
this.getLights().forEach((s) => {
|
|
128
|
+
s.setTimeBased(c);
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
setAllactuator(c) {
|
|
132
|
+
this.getOutlets().forEach((s) => {
|
|
133
|
+
s.setActuator(c);
|
|
125
134
|
});
|
|
126
135
|
}
|
|
127
|
-
|
|
136
|
+
setAllActuatorsTimeBased(time) {
|
|
128
137
|
this.getOutlets().forEach((s) => {
|
|
129
|
-
if (
|
|
130
|
-
time === undefined ||
|
|
131
|
-
(time === models_1.TimeOfDay.Night && s.settings.nightOn) ||
|
|
138
|
+
if ((time === models_1.TimeOfDay.Night && s.settings.nightOn) ||
|
|
132
139
|
(time === models_1.TimeOfDay.BeforeSunrise && s.settings.dawnOn) ||
|
|
133
140
|
(time === models_1.TimeOfDay.AfterSunset && s.settings.duskOn)) {
|
|
134
|
-
|
|
135
|
-
s.setActuator(pValue, timeout, force);
|
|
141
|
+
s.setActuator(new models_1.ActuatorSetStateCommand(models_1.CommandSource.Automatic, true, `LightGroup setAllActuatorsTimeBased`));
|
|
136
142
|
}
|
|
137
143
|
});
|
|
138
144
|
}
|
|
139
|
-
setAllLED(
|
|
145
|
+
setAllLED(c) {
|
|
140
146
|
this.getLED().forEach((s) => {
|
|
141
|
-
s.setLight(
|
|
147
|
+
s.setLight(c);
|
|
142
148
|
});
|
|
143
149
|
}
|
|
144
|
-
setAllWled(
|
|
150
|
+
setAllWled(c) {
|
|
145
151
|
this.getWled().forEach((w) => {
|
|
146
|
-
w.setWled(
|
|
152
|
+
w.setWled(c);
|
|
147
153
|
});
|
|
148
154
|
}
|
|
149
155
|
initialize() {
|
|
@@ -202,7 +208,7 @@ class LightGroup extends base_group_1.BaseGroup {
|
|
|
202
208
|
this.log(models_1.LogLevel.Info, `Draußen wird es dunkel --> Aktiviere Ambientenbeleuchtung`);
|
|
203
209
|
this.getAllAsActuator().forEach((a) => {
|
|
204
210
|
if (a.settings.includeInAmbientLight) {
|
|
205
|
-
a.setActuator(true);
|
|
211
|
+
a.setActuator(new models_1.ActuatorSetStateCommand(models_1.CommandSource.Automatic, true, 'Ambient Light Start Callback'));
|
|
206
212
|
}
|
|
207
213
|
});
|
|
208
214
|
services_1.Utils.guardedTimeout(() => {
|
|
@@ -210,7 +216,7 @@ class LightGroup extends base_group_1.BaseGroup {
|
|
|
210
216
|
this.log(models_1.LogLevel.Info, `Ambientenbeleuchtung um Mitternacht abschalten.`);
|
|
211
217
|
this._ambientLightOn = false;
|
|
212
218
|
if (((_a = this.getRoom().PraesenzGroup) === null || _a === void 0 ? void 0 : _a.anyPresent()) !== true) {
|
|
213
|
-
this.switchAll(false);
|
|
219
|
+
this.switchAll(new models_1.ActuatorSetStateCommand(models_1.CommandSource.Automatic, false, 'Ambient Light End Callback'));
|
|
214
220
|
}
|
|
215
221
|
}, services_1.Utils.timeTilMidnight, this);
|
|
216
222
|
}
|
|
@@ -38,14 +38,14 @@ class PresenceGroup extends base_group_1.BaseGroup {
|
|
|
38
38
|
this.addLastLeftCallback(() => {
|
|
39
39
|
var _a, _b;
|
|
40
40
|
(_a = this.getRoom().WindowGroup) === null || _a === void 0 ? void 0 : _a.changeVibrationMotionBlock(false);
|
|
41
|
-
(_b = this.getRoom().LightGroup) === null || _b === void 0 ? void 0 : _b.switchAll(false);
|
|
41
|
+
(_b = this.getRoom().LightGroup) === null || _b === void 0 ? void 0 : _b.switchAll(new models_1.ActuatorSetStateCommand(models_1.CommandSource.Automatic, false, 'Presence Group LastLeftCallback'));
|
|
42
42
|
});
|
|
43
43
|
this.addFirstEnterCallback(() => {
|
|
44
44
|
if (!this.getRoom().settings.lampenBeiBewegung) {
|
|
45
45
|
return;
|
|
46
46
|
}
|
|
47
47
|
this.log(models_1.LogLevel.DeepTrace, `Bewegung im Raum ${this.roomName} festgestellt --> Licht einschalten`);
|
|
48
|
-
this.getRoom().setLightTimeBased();
|
|
48
|
+
this.getRoom().setLightTimeBased(new models_1.RoomSetLightTimeBasedCommand(models_1.CommandSource.Automatic, true, 'Motion detected'));
|
|
49
49
|
});
|
|
50
50
|
this.getMotionDetector().forEach((b) => {
|
|
51
51
|
b.addMovementCallback((val) => {
|
|
@@ -7,6 +7,7 @@ const group_type_1 = require("./group-type");
|
|
|
7
7
|
const device_list_1 = require("../device-list");
|
|
8
8
|
const services_1 = require("../../services");
|
|
9
9
|
const button_1 = require("../button");
|
|
10
|
+
const models_1 = require("../../../models");
|
|
10
11
|
class TasterGroup extends base_group_1.BaseGroup {
|
|
11
12
|
constructor(roomName, buttonIds) {
|
|
12
13
|
super(roomName, group_type_1.GroupType.Buttons);
|
|
@@ -20,30 +21,45 @@ class TasterGroup extends base_group_1.BaseGroup {
|
|
|
20
21
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
21
22
|
(_a = t.buttonTopLeft) === null || _a === void 0 ? void 0 : _a.addCb(button_1.ButtonPressType.long, (pValue) => {
|
|
22
23
|
var _a;
|
|
23
|
-
|
|
24
|
+
if (!pValue) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
(_a = this.getRoom().WindowGroup) === null || _a === void 0 ? void 0 : _a.setDesiredPosition(new models_1.WindowSetDesiredPositionCommand(models_1.CommandSource.Manual, 0, 'Button Top Left pressed long'));
|
|
24
28
|
}, `Close all Rollos in this room`);
|
|
25
29
|
(_b = t.buttonTopLeft) === null || _b === void 0 ? void 0 : _b.addCb(button_1.ButtonPressType.short, (pValue) => {
|
|
26
30
|
var _a;
|
|
27
|
-
|
|
31
|
+
if (!pValue) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
(_a = this.getRoom().WindowGroup) === null || _a === void 0 ? void 0 : _a.setDesiredPosition(new models_1.WindowSetDesiredPositionCommand(models_1.CommandSource.Manual, 25, 'Button Top Left pressed short'));
|
|
28
35
|
}, `Nearly closes all Rollos in this room`);
|
|
29
36
|
(_c = t.buttonTopRight) === null || _c === void 0 ? void 0 : _c.addCb(button_1.ButtonPressType.long, (pValue) => {
|
|
30
37
|
var _a;
|
|
31
38
|
if (!pValue) {
|
|
32
39
|
return;
|
|
33
40
|
}
|
|
34
|
-
(_a = this.getRoom().WindowGroup) === null || _a === void 0 ? void 0 : _a.
|
|
41
|
+
(_a = this.getRoom().WindowGroup) === null || _a === void 0 ? void 0 : _a.setDesiredPosition(new models_1.WindowSetDesiredPositionCommand(models_1.CommandSource.Manual, 100, 'Button Top Right pressed long'));
|
|
35
42
|
}, `Open all Rollos in this room`);
|
|
36
43
|
(_d = t.buttonTopRight) === null || _d === void 0 ? void 0 : _d.addCb(button_1.ButtonPressType.short, (pValue) => {
|
|
37
44
|
var _a;
|
|
38
|
-
|
|
45
|
+
if (!pValue) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
(_a = this.getRoom().WindowGroup) === null || _a === void 0 ? void 0 : _a.setDesiredPosition(new models_1.WindowSetDesiredPositionCommand(models_1.CommandSource.Manual, 50, 'Button Top Right pressed short'));
|
|
39
49
|
}, `All Rollos in this room to middle`);
|
|
40
50
|
(_e = t.buttonMidLeft) === null || _e === void 0 ? void 0 : _e.addCb(button_1.ButtonPressType.long, (pValue) => {
|
|
41
51
|
var _a;
|
|
42
|
-
|
|
52
|
+
if (!pValue) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
(_a = this.getRoom().LightGroup) === null || _a === void 0 ? void 0 : _a.switchAll(new models_1.ActuatorSetStateCommand(models_1.CommandSource.Manual, true, 'Button press to turn all lights on'));
|
|
43
56
|
}, `Turn all Lights in this room on`);
|
|
44
57
|
(_f = t.buttonMidRight) === null || _f === void 0 ? void 0 : _f.addCb(button_1.ButtonPressType.long, (pValue) => {
|
|
45
58
|
var _a;
|
|
46
|
-
|
|
59
|
+
if (!pValue) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
(_a = this.getRoom().LightGroup) === null || _a === void 0 ? void 0 : _a.switchAll(new models_1.ActuatorSetStateCommand(models_1.CommandSource.Manual, false, 'Button press to turn all lights off'));
|
|
47
63
|
}, `Turn all Lights in this room off`);
|
|
48
64
|
if (((_g = services_1.SettingsService.settings.sonos) === null || _g === void 0 ? void 0 : _g.buttonBotRightForRadio) === true) {
|
|
49
65
|
const sonosGroup = this.getRoom().SonosGroup;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TimeCallback } from '../../../models';
|
|
1
|
+
import { RoomRestoreShutterPositionCommand, ShutterSunriseUpCommand, TimeCallback, WindowSetDesiredPositionCommand, WindowSetRolloByWeatherStatusCommand } from '../../../models';
|
|
2
2
|
import { Window } from './Window';
|
|
3
3
|
import { BaseGroup } from './base-group';
|
|
4
4
|
export declare class WindowGroup extends BaseGroup {
|
|
@@ -6,14 +6,12 @@ export declare class WindowGroup extends BaseGroup {
|
|
|
6
6
|
sunriseShutterCallback: TimeCallback | undefined;
|
|
7
7
|
sunsetShutterCallback: TimeCallback | undefined;
|
|
8
8
|
constructor(roomName: string, windows: Window[]);
|
|
9
|
-
|
|
10
|
-
allRolloUp(savePosition?: boolean): void;
|
|
11
|
-
allRolloToLevel(level: number, savePosition?: boolean): void;
|
|
9
|
+
setDesiredPosition(c: WindowSetDesiredPositionCommand): void;
|
|
12
10
|
initialize(): void;
|
|
13
11
|
recalcTimeCallbacks(): void;
|
|
14
|
-
setRolloByWeatherStatus(): void;
|
|
15
|
-
sunriseUp(
|
|
16
|
-
restoreRolloPosition(
|
|
12
|
+
setRolloByWeatherStatus(c: WindowSetRolloByWeatherStatusCommand): void;
|
|
13
|
+
sunriseUp(c: ShutterSunriseUpCommand): void;
|
|
14
|
+
restoreRolloPosition(c: RoomRestoreShutterPositionCommand): void;
|
|
17
15
|
changeVibrationMotionBlock(block: boolean): void;
|
|
18
16
|
private sunsetDown;
|
|
19
17
|
private reconfigureSunsetShutterCallback;
|
|
@@ -27,35 +27,21 @@ class WindowGroup extends base_group_1.BaseGroup {
|
|
|
27
27
|
this.deviceCluster.deviceMap.set(device_cluster_type_1.DeviceClusterType.Shutter, new device_list_1.DeviceList(shutterIds));
|
|
28
28
|
this.deviceCluster.deviceMap.set(device_cluster_type_1.DeviceClusterType.MagnetContact, new device_list_1.DeviceList(magnetIds));
|
|
29
29
|
}
|
|
30
|
-
|
|
30
|
+
setDesiredPosition(c) {
|
|
31
31
|
this.windows.forEach((f) => {
|
|
32
|
-
|
|
33
|
-
f.desiredPosition = 0;
|
|
34
|
-
services_1.ShutterService.windowAllDown(f, initial);
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
allRolloUp(savePosition = false) {
|
|
38
|
-
this.windows.forEach((f) => {
|
|
39
|
-
if (savePosition) {
|
|
40
|
-
f.desiredPosition = 100;
|
|
41
|
-
}
|
|
42
|
-
services_1.ShutterService.windowAllUp(f);
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
allRolloToLevel(level, savePosition = false) {
|
|
46
|
-
this.windows.forEach((f) => {
|
|
47
|
-
if (savePosition) {
|
|
48
|
-
f.desiredPosition = level;
|
|
49
|
-
}
|
|
50
|
-
services_1.ShutterService.windowAllToPosition(f, level, false);
|
|
32
|
+
f.setDesiredPosition(c);
|
|
51
33
|
});
|
|
52
34
|
}
|
|
53
35
|
initialize() {
|
|
54
36
|
const room = this.getRoom();
|
|
55
37
|
this.recalcTimeCallbacks();
|
|
56
38
|
if (room.settings.rolloHeatReduction) {
|
|
57
|
-
services_1.Utils.guardedInterval(
|
|
58
|
-
|
|
39
|
+
services_1.Utils.guardedInterval(() => {
|
|
40
|
+
this.setRolloByWeatherStatus(new models_1.WindowSetRolloByWeatherStatusCommand(models_1.CommandSource.Automatic, 'Regular interval'));
|
|
41
|
+
}, 15 * 60 * 1000, this, false);
|
|
42
|
+
services_1.Utils.guardedTimeout(() => {
|
|
43
|
+
this.setRolloByWeatherStatus(new models_1.WindowSetRolloByWeatherStatusCommand(models_1.CommandSource.Automatic, 'Delayed initial check'));
|
|
44
|
+
}, 2 * 60 * 1000, this);
|
|
59
45
|
}
|
|
60
46
|
this.windows.forEach((f) => {
|
|
61
47
|
f.initialize();
|
|
@@ -65,7 +51,7 @@ class WindowGroup extends base_group_1.BaseGroup {
|
|
|
65
51
|
this.reconfigureSunriseShutterCallback();
|
|
66
52
|
this.reconfigureSunsetShutterCallback();
|
|
67
53
|
}
|
|
68
|
-
setRolloByWeatherStatus() {
|
|
54
|
+
setRolloByWeatherStatus(c) {
|
|
69
55
|
const room = this.getRoom();
|
|
70
56
|
const timeOfDay = services_1.TimeCallbackService.dayType(room.settings.rolloOffset);
|
|
71
57
|
const darkOutside = services_1.TimeCallbackService.darkOutsideOrNight(timeOfDay);
|
|
@@ -76,7 +62,7 @@ class WindowGroup extends base_group_1.BaseGroup {
|
|
|
76
62
|
return;
|
|
77
63
|
}
|
|
78
64
|
if (darkOutside) {
|
|
79
|
-
f.restoreDesiredPosition();
|
|
65
|
+
f.restoreDesiredPosition(new models_1.WindowRestoreDesiredPositionCommand(c, `It's dark outside.`));
|
|
80
66
|
return;
|
|
81
67
|
}
|
|
82
68
|
let desiredPos = f.desiredPosition;
|
|
@@ -89,30 +75,29 @@ class WindowGroup extends base_group_1.BaseGroup {
|
|
|
89
75
|
if (f.griffeInPosition(models_2.WindowPosition.kipp) > 0) {
|
|
90
76
|
desiredPos = Math.max(30, desiredPos);
|
|
91
77
|
}
|
|
92
|
-
services_1.ShutterService.windowAllToPosition(f, desiredPos,
|
|
78
|
+
services_1.ShutterService.windowAllToPosition(f, new models_1.ShutterSetLevelCommand(c, desiredPos, '', true));
|
|
93
79
|
});
|
|
94
80
|
}
|
|
95
|
-
sunriseUp(
|
|
81
|
+
sunriseUp(c) {
|
|
96
82
|
this.windows.forEach((f) => {
|
|
97
83
|
if (!this.getRoom().settings.sonnenAufgangRollos || f.getShutter().length === 0) {
|
|
98
84
|
return;
|
|
99
85
|
}
|
|
100
|
-
|
|
101
|
-
f.setDesiredPosition(100);
|
|
86
|
+
f.setDesiredPosition(new models_1.WindowSetDesiredPositionCommand(c, 100));
|
|
102
87
|
});
|
|
103
88
|
}
|
|
104
|
-
restoreRolloPosition(
|
|
105
|
-
if (!recalc) {
|
|
89
|
+
restoreRolloPosition(c) {
|
|
90
|
+
if (!c.recalc) {
|
|
106
91
|
this.windows.forEach((f) => {
|
|
107
|
-
f.restoreDesiredPosition();
|
|
92
|
+
f.restoreDesiredPosition(new models_1.WindowRestoreDesiredPositionCommand(c));
|
|
108
93
|
});
|
|
109
94
|
return;
|
|
110
95
|
}
|
|
111
96
|
if (!services_1.TimeCallbackService.darkOutsideOrNight(services_1.TimeCallbackService.dayType(this.getRoom().settings.rolloOffset))) {
|
|
112
|
-
this.sunriseUp(
|
|
97
|
+
this.sunriseUp(new models_1.ShutterSunriseUpCommand(c, 'It is daytime'));
|
|
113
98
|
}
|
|
114
99
|
else {
|
|
115
|
-
this.sunsetDown();
|
|
100
|
+
this.sunsetDown(new models_1.ShutterSunsetDownCommand(c, 'It is dark outside or nighttime'));
|
|
116
101
|
}
|
|
117
102
|
}
|
|
118
103
|
changeVibrationMotionBlock(block) {
|
|
@@ -125,13 +110,10 @@ class WindowGroup extends base_group_1.BaseGroup {
|
|
|
125
110
|
});
|
|
126
111
|
});
|
|
127
112
|
}
|
|
128
|
-
sunsetDown() {
|
|
129
|
-
|
|
130
|
-
this.allRolloToLevel(0, true);
|
|
113
|
+
sunsetDown(c) {
|
|
114
|
+
this.setDesiredPosition(new models_1.WindowSetDesiredPositionCommand(c, 0));
|
|
131
115
|
const room = this.getRoom();
|
|
132
|
-
|
|
133
|
-
(_b = room.LightGroup) === null || _b === void 0 ? void 0 : _b.switchTimeConditional(services_1.TimeCallbackService.dayType(room.settings.lampOffset));
|
|
134
|
-
}
|
|
116
|
+
room.setLightTimeBased(new models_1.RoomSetLightTimeBasedCommand(c, true, 'sunsetDown'));
|
|
135
117
|
}
|
|
136
118
|
reconfigureSunsetShutterCallback() {
|
|
137
119
|
const room = this.getRoom();
|
|
@@ -155,11 +137,11 @@ class WindowGroup extends base_group_1.BaseGroup {
|
|
|
155
137
|
if (this.sunsetShutterCallback === undefined) {
|
|
156
138
|
this.log(models_1.LogLevel.Debug, `Add Sunset Shutter callback for ${this.roomName}`);
|
|
157
139
|
this.sunsetShutterCallback = new models_1.TimeCallback(`${this.roomName} Sunset Shutter`, models_1.TimeCallbackType.SunSet, () => {
|
|
158
|
-
this.sunsetDown();
|
|
140
|
+
this.sunsetDown(new models_1.ShutterSunsetDownCommand(models_1.CommandSource.Automatic, 'Time-Callback fired'));
|
|
159
141
|
}, room.settings.rolloOffset.sunset);
|
|
160
142
|
if (services_1.TimeCallbackService.darkOutsideOrNight(services_1.TimeCallbackService.dayType(room.settings.rolloOffset))) {
|
|
161
143
|
services_1.Utils.guardedTimeout(() => {
|
|
162
|
-
this.
|
|
144
|
+
this.setDesiredPosition(new models_1.WindowSetDesiredPositionCommand(models_1.CommandSource.Initial, 0, 'It is dark outside'));
|
|
163
145
|
}, 60000, this);
|
|
164
146
|
}
|
|
165
147
|
services_1.TimeCallbackService.addCallback(this.sunsetShutterCallback);
|
|
@@ -188,10 +170,10 @@ class WindowGroup extends base_group_1.BaseGroup {
|
|
|
188
170
|
room.skipNextRolloUp = false;
|
|
189
171
|
return;
|
|
190
172
|
}
|
|
191
|
-
this.sunriseUp();
|
|
173
|
+
this.sunriseUp(new models_1.ShutterSunriseUpCommand(models_1.CommandSource.Automatic, 'Time-Callback fired'));
|
|
192
174
|
}, room.settings.rolloOffset.sunrise, undefined, undefined, room.settings.rolloOffset);
|
|
193
175
|
if (!services_1.TimeCallbackService.darkOutsideOrNight(services_1.TimeCallbackService.dayType(room.settings.rolloOffset))) {
|
|
194
|
-
this.sunriseUp(
|
|
176
|
+
this.sunriseUp(new models_1.ShutterSunriseUpCommand(models_1.CommandSource.Initial, 'Initial sunrise up as it is day'));
|
|
195
177
|
}
|
|
196
178
|
services_1.TimeCallbackService.addCallback(this.sunriseShutterCallback);
|
|
197
179
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HmIPDevice } from './hmIpDevice';
|
|
2
|
-
import { ActuatorSettings,
|
|
2
|
+
import { ActuatorSetStateCommand, ActuatorSettings, ActuatorToggleCommand, ActuatorWriteStateToDeviceCommand, LampSetLightCommand, LampSetTimeBasedCommand, LampToggleLightCommand, RestoreTargetAutomaticValueCommand } from '../../../models';
|
|
3
3
|
import { iLamp, iTemporaryDisableAutomatic } from '../baseDeviceInterfaces';
|
|
4
4
|
import { IoBrokerDeviceInfo } from '../IoBrokerDeviceInfo';
|
|
5
5
|
import { BlockAutomaticHandler } from '../../services/blockAutomaticHandler';
|
|
@@ -12,13 +12,14 @@ export declare class HmIpLampe extends HmIPDevice implements iLamp, iTemporaryDi
|
|
|
12
12
|
targetAutomaticState: boolean;
|
|
13
13
|
constructor(pInfo: IoBrokerDeviceInfo);
|
|
14
14
|
get actuatorOn(): boolean;
|
|
15
|
-
restoreTargetAutomaticValue(): void;
|
|
15
|
+
restoreTargetAutomaticValue(c: RestoreTargetAutomaticValueCommand): void;
|
|
16
16
|
update(idSplit: string[], state: ioBroker.State, initial?: boolean): void;
|
|
17
|
-
setActuator(
|
|
18
|
-
toggleActuator(
|
|
17
|
+
setActuator(command: ActuatorSetStateCommand): void;
|
|
18
|
+
toggleActuator(c: ActuatorToggleCommand): boolean;
|
|
19
19
|
/** @inheritdoc */
|
|
20
|
-
setLight(
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
setLight(c: LampSetLightCommand): void;
|
|
21
|
+
writeActuatorStateToDevice(c: ActuatorWriteStateToDeviceCommand): void;
|
|
22
|
+
toggleLight(c: LampToggleLightCommand): boolean;
|
|
23
|
+
setTimeBased(c: LampSetTimeBasedCommand): void;
|
|
23
24
|
persist(): void;
|
|
24
25
|
}
|
|
@@ -24,9 +24,9 @@ class HmIpLampe extends hmIpDevice_1.HmIPDevice {
|
|
|
24
24
|
get actuatorOn() {
|
|
25
25
|
return this.lightOn;
|
|
26
26
|
}
|
|
27
|
-
restoreTargetAutomaticValue() {
|
|
28
|
-
this.log(models_1.LogLevel.Debug,
|
|
29
|
-
this.
|
|
27
|
+
restoreTargetAutomaticValue(c) {
|
|
28
|
+
this.log(models_1.LogLevel.Debug, c.logMessage);
|
|
29
|
+
this.setLight(new models_1.LampSetLightCommand(c, this.targetAutomaticState, 'Lampen RestoreTargetAutomaticValue'));
|
|
30
30
|
}
|
|
31
31
|
update(idSplit, state, initial = false) {
|
|
32
32
|
this.log(models_1.LogLevel.DeepTrace, `Lampen Update : ID: ${idSplit.join('.')} JSON: ${JSON.stringify(state)}`);
|
|
@@ -41,45 +41,33 @@ class HmIpLampe extends hmIpDevice_1.HmIPDevice {
|
|
|
41
41
|
break;
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
setActuator(
|
|
45
|
-
this.setLight(
|
|
44
|
+
setActuator(command) {
|
|
45
|
+
this.setLight(command);
|
|
46
46
|
}
|
|
47
|
-
toggleActuator(
|
|
48
|
-
|
|
47
|
+
toggleActuator(c) {
|
|
48
|
+
const setActuatorCommand = models_1.ActuatorSetStateCommand.byActuatorAndToggleCommand(this, c);
|
|
49
|
+
this.setActuator(setActuatorCommand);
|
|
50
|
+
return setActuatorCommand.on;
|
|
49
51
|
}
|
|
50
52
|
/** @inheritdoc */
|
|
51
|
-
setLight(
|
|
52
|
-
if (sharedFunctions_1.LampUtils.checkBlockActive(this, force, pValue)) {
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
if (sharedFunctions_1.LampUtils.checkUnchanged(this, force, pValue)) {
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
53
|
+
setLight(c) {
|
|
58
54
|
if (this.lightOnSwitchID === '') {
|
|
59
55
|
this.log(models_1.LogLevel.Error, `Keine Switch ID bekannt.`);
|
|
60
56
|
return;
|
|
61
57
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
58
|
+
sharedFunctions_1.LampUtils.setActuator(this, c);
|
|
59
|
+
}
|
|
60
|
+
writeActuatorStateToDevice(c) {
|
|
61
|
+
this.log(models_1.LogLevel.Debug, c.logMessage, services_1.LogDebugType.SetActuator);
|
|
62
|
+
this.setState(this.lightOnSwitchID, c.stateValue, undefined, (err) => {
|
|
65
63
|
this.log(models_1.LogLevel.Error, `Lampe schalten ergab Fehler: ${err}`);
|
|
66
64
|
});
|
|
67
|
-
if (this.settings.isStromStoss && pValue) {
|
|
68
|
-
timeout = 3000;
|
|
69
|
-
sharedFunctions_1.LampUtils.stromStossOn(this);
|
|
70
|
-
}
|
|
71
|
-
if (timeout < 0 || !pValue) {
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
74
|
-
if (timeout > -1) {
|
|
75
|
-
this.blockAutomationHandler.disableAutomatic(timeout, models_1.CollisionSolving.overrideIfGreater);
|
|
76
|
-
}
|
|
77
65
|
}
|
|
78
|
-
toggleLight(
|
|
79
|
-
return sharedFunctions_1.LampUtils.toggleLight(this,
|
|
66
|
+
toggleLight(c) {
|
|
67
|
+
return sharedFunctions_1.LampUtils.toggleLight(this, c);
|
|
80
68
|
}
|
|
81
|
-
setTimeBased(
|
|
82
|
-
sharedFunctions_1.LampUtils.setTimeBased(this,
|
|
69
|
+
setTimeBased(c) {
|
|
70
|
+
sharedFunctions_1.LampUtils.setTimeBased(this, c);
|
|
83
71
|
}
|
|
84
72
|
persist() {
|
|
85
73
|
var _a;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HmIPDevice } from './hmIpDevice';
|
|
2
2
|
import { Window } from '../groups';
|
|
3
|
-
import { ShutterSettings } from '../../../models';
|
|
3
|
+
import { ShutterSetLevelCommand, ShutterSettings } from '../../../models';
|
|
4
4
|
import { iShutter } from '../baseDeviceInterfaces';
|
|
5
5
|
import { IoBrokerBaseDevice } from '../IoBrokerBaseDevice';
|
|
6
6
|
import { IoBrokerDeviceInfo } from '../IoBrokerDeviceInfo';
|
|
@@ -20,6 +20,6 @@ export declare class HmIpRoll extends HmIPDevice implements iShutter {
|
|
|
20
20
|
get desiredWindowShutterLevel(): number;
|
|
21
21
|
persist(): void;
|
|
22
22
|
update(idSplit: string[], state: ioBroker.State, initial?: boolean): void;
|
|
23
|
-
setLevel(
|
|
23
|
+
setLevel(command: ShutterSetLevelCommand): void;
|
|
24
24
|
toJSON(): Partial<IoBrokerBaseDevice>;
|
|
25
25
|
}
|