hoffmation-base 2.17.1 → 2.17.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.
@@ -20,6 +20,11 @@ export declare class ActuatorSettings extends DeviceSettings {
20
20
  * @type {number}
21
21
  */
22
22
  stromStossResendTime: number;
23
+ /**
24
+ * Whether to include this device in the ambient light option.
25
+ * @type {boolean}
26
+ */
27
+ includeInAmbientLight: boolean;
23
28
  fromPartialObject(data: Partial<ActuatorSettings>): void;
24
29
  protected toJSON(): Partial<ActuatorSettings>;
25
30
  }
@@ -26,6 +26,11 @@ class ActuatorSettings extends deviceSettings_1.DeviceSettings {
26
26
  * @type {number}
27
27
  */
28
28
  this.stromStossResendTime = 180;
29
+ /**
30
+ * Whether to include this device in the ambient light option.
31
+ * @type {boolean}
32
+ */
33
+ this.includeInAmbientLight = false;
29
34
  }
30
35
  fromPartialObject(data) {
31
36
  var _a, _b, _c, _d, _e, _f;
@@ -193,7 +193,26 @@ class LightGroup extends base_group_1.BaseGroup {
193
193
  ambientLightStartCallback() {
194
194
  this._ambientLightOn = true;
195
195
  this.log(models_1.LogLevel.Info, `Draußen wird es dunkel --> Aktiviere Ambientenbeleuchtung`);
196
- this.switchAll(true);
196
+ this.getLights().forEach((l) => {
197
+ if (l.settings.includeInAmbientLight) {
198
+ l.setLight(true, -1, false);
199
+ }
200
+ });
201
+ this.getOutlets().forEach((o) => {
202
+ if (o.settings.includeInAmbientLight) {
203
+ o.setActuator(true);
204
+ }
205
+ });
206
+ this.getLED().forEach((s) => {
207
+ if (s.settings.includeInAmbientLight) {
208
+ s.setLight(true, -1, false);
209
+ }
210
+ });
211
+ this.getWled().forEach((wled) => {
212
+ if (wled.settings.includeInAmbientLight) {
213
+ wled.setLight(true);
214
+ }
215
+ });
197
216
  services_1.Utils.guardedTimeout(() => {
198
217
  var _a;
199
218
  this.log(models_1.LogLevel.Info, `Ambientenbeleuchtung um Mitternacht abschalten.`);
@@ -80,7 +80,7 @@ class Utils {
80
80
  return object;
81
81
  }
82
82
  static jsonFilter(object, additionalOmitKeys = []) {
83
- const keysToOmit = ['timeout', 'interval', 'timeouts', 'callback'];
83
+ const keysToOmit = ['timeout', 'interval', 'timeouts', 'callback', 'otaInfo'];
84
84
  keysToOmit.push(...additionalOmitKeys);
85
85
  return this.deepOmit(object, keysToOmit);
86
86
  }