hoffmation-base 3.2.3-alpha.0 → 3.2.3-alpha.2
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/action/dingSensorAction.d.ts +16 -0
- package/lib/action/dingSensorAction.js +15 -0
- package/lib/action/index.d.ts +1 -0
- package/lib/action/index.js +3 -1
- package/lib/devices/DoorDevice.d.ts +38 -0
- package/lib/devices/DoorDevice.js +104 -0
- package/lib/devices/dachs/dachs.js +6 -4
- package/lib/devices/devices.d.ts +6 -3
- package/lib/devices/index.d.ts +1 -0
- package/lib/devices/index.js +1 -0
- package/lib/devices/unifi/index.d.ts +2 -0
- package/lib/devices/unifi/index.js +2 -0
- package/lib/devices/unifi/own-unifi-door.d.ts +15 -0
- package/lib/devices/unifi/own-unifi-door.js +48 -0
- package/lib/devices/unifi/unifi-access.d.ts +19 -0
- package/lib/devices/unifi/unifi-access.js +98 -0
- package/lib/devices/unifi/unifi-logger.d.ts +10 -0
- package/lib/devices/unifi/unifi-logger.js +31 -0
- package/lib/devices/unifi/unifi-protect.js +2 -23
- package/lib/enums/DeviceCapability.d.ts +2 -1
- package/lib/enums/DeviceCapability.js +1 -0
- package/lib/enums/commandType.d.ts +2 -1
- package/lib/enums/commandType.js +1 -0
- package/lib/enums/deviceType.d.ts +1 -0
- package/lib/enums/deviceType.js +1 -0
- package/lib/enums/logSource.d.ts +2 -1
- package/lib/enums/logSource.js +1 -0
- package/lib/index.js +5 -1
- package/lib/interfaces/baseDevices/iDoorDevice.d.ts +33 -0
- package/lib/interfaces/baseDevices/iDoorDevice.js +2 -0
- package/lib/interfaces/baseDevices/index.d.ts +1 -0
- package/lib/interfaces/deviceSettings/iDoorSettings.d.ts +18 -0
- package/lib/interfaces/deviceSettings/iDoorSettings.js +2 -0
- package/lib/interfaces/deviceSettings/index.d.ts +1 -0
- package/lib/interfaces/iUnifiProtectOptions.d.ts +4 -0
- package/lib/settingsObjects/deviceSettings/doorSettings.d.ts +8 -0
- package/lib/settingsObjects/deviceSettings/doorSettings.js +21 -0
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -2
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { iRoomDevice } from './iRoomDevice';
|
|
2
|
+
import { iDoorSettings } from '../deviceSettings';
|
|
3
|
+
import { DingSensorAction } from '../../action';
|
|
4
|
+
/**
|
|
5
|
+
* An interface defining a door device
|
|
6
|
+
*/
|
|
7
|
+
export interface iDoorDevice extends iRoomDevice {
|
|
8
|
+
/**
|
|
9
|
+
* The settings of the doorbell device
|
|
10
|
+
*/
|
|
11
|
+
settings: iDoorSettings;
|
|
12
|
+
/**
|
|
13
|
+
* Whether the doorbell is currently dinging
|
|
14
|
+
*/
|
|
15
|
+
readonly dingActive: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* The last time the doorbell received a data update.
|
|
18
|
+
*/
|
|
19
|
+
readonly lastUpdate: Date;
|
|
20
|
+
/**
|
|
21
|
+
* The number of seconds since the last ding
|
|
22
|
+
*/
|
|
23
|
+
readonly timeSinceDing: number;
|
|
24
|
+
/**
|
|
25
|
+
* The number of dings today
|
|
26
|
+
*/
|
|
27
|
+
readonly dingsToday: number;
|
|
28
|
+
/**
|
|
29
|
+
* Adds a callback for when a ding state has changed.
|
|
30
|
+
* @param pCallback - Function that accepts the new state as parameter
|
|
31
|
+
*/
|
|
32
|
+
addDingCallback(pCallback: (action: DingSensorAction) => void): void;
|
|
33
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { iDeviceSettings } from './iDeviceSettings';
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
*/
|
|
5
|
+
export interface iDoorSettings extends iDeviceSettings {
|
|
6
|
+
/**
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
alertDingOnTelegram: boolean;
|
|
10
|
+
/**
|
|
11
|
+
*
|
|
12
|
+
*/
|
|
13
|
+
fromPartialObject(data: Partial<iDoorSettings>): void;
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
*/
|
|
17
|
+
toJSON(): Partial<iDoorSettings>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { iDoorSettings } from '../../interfaces';
|
|
2
|
+
import { DeviceSettings } from './deviceSettings';
|
|
3
|
+
export declare class DoorSettings extends DeviceSettings implements iDoorSettings {
|
|
4
|
+
/** @inheritdoc */
|
|
5
|
+
alertDingOnTelegram: boolean;
|
|
6
|
+
fromPartialObject(data: Partial<DoorSettings>): void;
|
|
7
|
+
toJSON(): Partial<DoorSettings>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DoorSettings = void 0;
|
|
4
|
+
const utils_1 = require("../../utils");
|
|
5
|
+
const deviceSettings_1 = require("./deviceSettings");
|
|
6
|
+
class DoorSettings extends deviceSettings_1.DeviceSettings {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
/** @inheritdoc */
|
|
10
|
+
this.alertDingOnTelegram = false;
|
|
11
|
+
}
|
|
12
|
+
fromPartialObject(data) {
|
|
13
|
+
var _a;
|
|
14
|
+
this.alertDingOnTelegram = (_a = data.alertDingOnTelegram) !== null && _a !== void 0 ? _a : this.alertDingOnTelegram;
|
|
15
|
+
super.fromPartialObject(data);
|
|
16
|
+
}
|
|
17
|
+
toJSON() {
|
|
18
|
+
return utils_1.Utils.jsonFilter(this);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.DoorSettings = DoorSettings;
|