hoffmation-base 3.2.15 → 3.2.16
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/devices/dachs/dachs.js +18 -3
- package/lib/devices/groups/windowGroup.js +1 -0
- package/lib/devices/hmIPDevices/hmIpRoll.d.ts +2 -0
- package/lib/devices/hmIPDevices/hmIpRoll.js +2 -0
- package/lib/devices/sharedFunctions/shutterUtils.js +7 -5
- package/lib/devices/velux/veluxShutter.d.ts +2 -0
- package/lib/devices/velux/veluxShutter.js +2 -0
- package/lib/devices/zigbee/BaseDevices/zigbeeShutter.d.ts +2 -0
- package/lib/devices/zigbee/BaseDevices/zigbeeShutter.js +2 -0
- package/lib/interfaces/baseDevices/iShutter.d.ts +4 -0
- package/lib/interfaces/deviceSettings/iDachsDeviceSettings.d.ts +4 -0
- package/lib/interfaces/settings/iExcessEnergyConsumerSettings.d.ts +4 -0
- package/lib/services/ac/ac-device.js +1 -1
- package/lib/settingsObjects/deviceSettings/dachsSettings.d.ts +2 -0
- package/lib/settingsObjects/deviceSettings/dachsSettings.js +14 -11
- package/lib/settingsObjects/excessEnergyConsumerSettings.d.ts +2 -0
- package/lib/settingsObjects/excessEnergyConsumerSettings.js +4 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/utils/utils.d.ts +1 -0
- package/lib/utils/utils.js +10 -0
- package/package.json +1 -1
package/lib/utils/utils.d.ts
CHANGED
|
@@ -29,4 +29,5 @@ export declare class Utils {
|
|
|
29
29
|
static timeWithinBorders(minimumHours: number, minimumMinutes: number, maxHours: number, maxMinutes: number, now?: Date): boolean;
|
|
30
30
|
static formatHex(hex: string): string | null;
|
|
31
31
|
static hexToRgb(color: string): RGB | null;
|
|
32
|
+
static isToday(msToCheck: number, now?: Date): boolean;
|
|
32
33
|
}
|
package/lib/utils/utils.js
CHANGED
|
@@ -310,5 +310,15 @@ class Utils {
|
|
|
310
310
|
}
|
|
311
311
|
return { r, g, b };
|
|
312
312
|
}
|
|
313
|
+
static isToday(msToCheck, now) {
|
|
314
|
+
if (msToCheck === 0) {
|
|
315
|
+
return false;
|
|
316
|
+
}
|
|
317
|
+
const date = new Date(msToCheck);
|
|
318
|
+
const nowDate = now !== null && now !== void 0 ? now : new Date();
|
|
319
|
+
return (date.getFullYear() === nowDate.getFullYear() &&
|
|
320
|
+
date.getMonth() === nowDate.getMonth() &&
|
|
321
|
+
date.getDate() === nowDate.getDate());
|
|
322
|
+
}
|
|
313
323
|
}
|
|
314
324
|
exports.Utils = Utils;
|