hoffmation-base 3.2.26 → 3.2.28

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.
@@ -8,6 +8,15 @@ export interface iDeviceSettings extends iObjectSettings {
8
8
  *
9
9
  */
10
10
  energySettings: iExcessEnergyConsumerSettings | undefined;
11
+ /**
12
+ * The position of the device in the room in meters
13
+ * @default {x: 0, y: 0, z: 0}
14
+ */
15
+ trilaterationRoomPosition: {
16
+ x: number;
17
+ y: number;
18
+ z: number;
19
+ };
11
20
  /**
12
21
  *
13
22
  */
@@ -0,0 +1,17 @@
1
+ /**
2
+ *
3
+ */
4
+ export interface iTrilaterationCoordinate {
5
+ /**
6
+ *
7
+ */
8
+ x: number;
9
+ /**
10
+ *
11
+ */
12
+ y: number;
13
+ /**
14
+ *
15
+ */
16
+ z: number;
17
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,19 +1,8 @@
1
+ import { iTrilaterationCoordinate } from './iTrilaterationCoordinate';
1
2
  /**
2
3
  *
3
4
  */
4
- export interface iTrilaterationPoint {
5
- /**
6
- *
7
- */
8
- x: number;
9
- /**
10
- *
11
- */
12
- y: number;
13
- /**
14
- *
15
- */
16
- z: number;
5
+ export interface iTrilaterationPoint extends iTrilaterationCoordinate {
17
6
  /**
18
7
  *
19
8
  */
@@ -53,3 +53,4 @@ export { iDeviceCluster } from './iDevicecluster';
53
53
  export { iDaytime } from './iDaytime';
54
54
  export { iBlockAutomaticHandler } from './iBlockAutomaticHandler';
55
55
  export { iTemperatureMeasurement } from './iTemperatureMeasurement';
56
+ export { iTrilaterationCoordinate } from './iTrilaterationCoordinate';
@@ -5,6 +5,8 @@ import { GroupType, LogLevel } from '../enums';
5
5
  import { RoomInfo, RoomSettingsController } from '../models';
6
6
  export declare class RoomBase implements iRoomBase, iIdHolder {
7
7
  groupMap: Map<GroupType, BaseGroup>;
8
+ startPoint?: iTrilaterationPoint | undefined;
9
+ endPoint?: iTrilaterationPoint | undefined;
8
10
  /**
9
11
  * @see RoomInfo
10
12
  */
@@ -15,7 +17,7 @@ export declare class RoomBase implements iRoomBase, iIdHolder {
15
17
  * The settings for this room
16
18
  */
17
19
  settings: RoomSettingsController;
18
- constructor(groupMap: Map<GroupType, BaseGroup>, roomName: string, etage?: number, startPoint?: iTrilaterationPoint, endPoint?: iTrilaterationPoint);
20
+ constructor(groupMap: Map<GroupType, BaseGroup>, roomName: string, etage?: number, startPoint?: iTrilaterationPoint | undefined, endPoint?: iTrilaterationPoint | undefined);
19
21
  get sonnenUntergangLichtCallback(): ITimeCallback | undefined;
20
22
  get sonnenAufgangLichtCallback(): ITimeCallback | undefined;
21
23
  get sunriseShutterCallback(): ITimeCallback | undefined;
@@ -17,6 +17,8 @@ const models_1 = require("../models");
17
17
  class RoomBase {
18
18
  constructor(groupMap, roomName, etage = 99, startPoint, endPoint) {
19
19
  this.groupMap = groupMap;
20
+ this.startPoint = startPoint;
21
+ this.endPoint = endPoint;
20
22
  /** @inheritDoc */
21
23
  this.skipNextRolloUp = false;
22
24
  this._deviceCluster = new devices_1.DeviceCluster();
@@ -1,8 +1,13 @@
1
- import { iBlockAutomaticSettings, iDeviceSettings, iExcessEnergyConsumerSettings } from '../../interfaces';
1
+ import { iBlockAutomaticSettings, iDeviceSettings, iExcessEnergyConsumerSettings, iTrilaterationCoordinate } from '../../interfaces';
2
2
  import { ObjectSettings } from '../objectSettings';
3
3
  import { BlockAutomaticCommand, iBaseCommand } from '../../command';
4
4
  export declare abstract class DeviceSettings extends ObjectSettings implements iDeviceSettings {
5
5
  buildBlockAutomaticCommand(c: iBaseCommand): BlockAutomaticCommand | null | undefined;
6
+ /**
7
+ * The position of the device in the room in meters
8
+ * @default {x: 0, y: 0, z: 0}
9
+ */
10
+ trilaterationRoomPosition: iTrilaterationCoordinate;
6
11
  /**
7
12
  * Any device could be an energy consumer, so we have to provide the settings for it
8
13
  * @default undefined
@@ -9,6 +9,11 @@ const command_1 = require("../../command");
9
9
  class DeviceSettings extends objectSettings_1.ObjectSettings {
10
10
  constructor() {
11
11
  super(...arguments);
12
+ /**
13
+ * The position of the device in the room in meters
14
+ * @default {x: 0, y: 0, z: 0}
15
+ */
16
+ this.trilaterationRoomPosition = { x: 0, y: 0, z: 0 };
12
17
  /**
13
18
  * Any device could be an energy consumer, so we have to provide the settings for it
14
19
  * @default undefined
@@ -33,7 +38,7 @@ class DeviceSettings extends objectSettings_1.ObjectSettings {
33
38
  return new command_1.BlockAutomaticCommand(c, (_b = this.blockAutomaticSettings) === null || _b === void 0 ? void 0 : _b.blockAutomaticDurationMS, '', (_c = this.blockAutomaticSettings) === null || _c === void 0 ? void 0 : _c.defaultCollisionSolving, (_d = this.blockAutomaticSettings) === null || _d === void 0 ? void 0 : _d.revertToAutomaticAtBlockLift);
34
39
  }
35
40
  fromPartialObject(_obj) {
36
- var _a;
41
+ var _a, _b;
37
42
  if (_obj.energySettings) {
38
43
  if (this.energySettings === undefined) {
39
44
  this.energySettings = new excessEnergyConsumerSettings_1.ExcessEnergyConsumerSettings();
@@ -47,6 +52,7 @@ class DeviceSettings extends objectSettings_1.ObjectSettings {
47
52
  this.blockAutomaticSettings.fromPartialObject(_obj.blockAutomaticSettings);
48
53
  }
49
54
  this.skipInHomebridge = (_a = _obj.skipInHomebridge) !== null && _a !== void 0 ? _a : this.skipInHomebridge;
55
+ this.trilaterationRoomPosition = (_b = _obj.trilaterationRoomPosition) !== null && _b !== void 0 ? _b : this.trilaterationRoomPosition;
50
56
  super.fromPartialObject(_obj);
51
57
  }
52
58
  toJSON() {