@mp-consulting/homebridge-daikin-cloud 1.5.2 → 1.6.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/README.md +40 -27
- package/config.schema.json +66 -12
- package/dist/src/accessories/air-conditioning-accessory.js +1 -1
- package/dist/src/accessories/air-conditioning-accessory.js.map +1 -1
- package/dist/src/accessories/altherma-accessory.js +1 -1
- package/dist/src/accessories/altherma-accessory.js.map +1 -1
- package/dist/src/accessories/base-accessory.d.ts +5 -4
- package/dist/src/accessories/base-accessory.d.ts.map +1 -1
- package/dist/src/accessories/base-accessory.js +9 -10
- package/dist/src/accessories/base-accessory.js.map +1 -1
- package/dist/src/api/daikin-api.d.ts +22 -6
- package/dist/src/api/daikin-api.d.ts.map +1 -1
- package/dist/src/api/daikin-api.js +49 -23
- package/dist/src/api/daikin-api.js.map +1 -1
- package/dist/src/api/daikin-controller.d.ts +4 -48
- package/dist/src/api/daikin-controller.d.ts.map +1 -1
- package/dist/src/api/daikin-controller.js +14 -84
- package/dist/src/api/daikin-controller.js.map +1 -1
- package/dist/src/api/daikin-mobile-oauth.d.ts +11 -40
- package/dist/src/api/daikin-mobile-oauth.d.ts.map +1 -1
- package/dist/src/api/daikin-mobile-oauth.js +36 -160
- package/dist/src/api/daikin-mobile-oauth.js.map +1 -1
- package/dist/src/api/daikin-oauth.d.ts +10 -37
- package/dist/src/api/daikin-oauth.d.ts.map +1 -1
- package/dist/src/api/daikin-oauth.js +36 -166
- package/dist/src/api/daikin-oauth.js.map +1 -1
- package/dist/src/api/daikin-schemas.d.ts +20 -22
- package/dist/src/api/daikin-schemas.d.ts.map +1 -1
- package/dist/src/api/daikin-schemas.js +17 -49
- package/dist/src/api/daikin-schemas.js.map +1 -1
- package/dist/src/api/daikin-types.d.ts +11 -23
- package/dist/src/api/daikin-types.d.ts.map +1 -1
- package/dist/src/api/daikin-types.js.map +1 -1
- package/dist/src/api/daikin-websocket.d.ts +4 -5
- package/dist/src/api/daikin-websocket.d.ts.map +1 -1
- package/dist/src/api/daikin-websocket.js +62 -34
- package/dist/src/api/daikin-websocket.js.map +1 -1
- package/dist/src/api/http-defaults.d.ts +3 -2
- package/dist/src/api/http-defaults.d.ts.map +1 -1
- package/dist/src/api/http-defaults.js.map +1 -1
- package/dist/src/api/http-transport.d.ts +14 -2
- package/dist/src/api/http-transport.d.ts.map +1 -1
- package/dist/src/api/http-transport.js +32 -9
- package/dist/src/api/http-transport.js.map +1 -1
- package/dist/src/api/token-client.d.ts +82 -0
- package/dist/src/api/token-client.d.ts.map +1 -0
- package/dist/src/api/token-client.js +188 -0
- package/dist/src/api/token-client.js.map +1 -0
- package/dist/src/api/token-storage.d.ts +6 -0
- package/dist/src/api/token-storage.d.ts.map +1 -1
- package/dist/src/api/token-storage.js +27 -1
- package/dist/src/api/token-storage.js.map +1 -1
- package/dist/src/config/config-manager.d.ts +69 -125
- package/dist/src/config/config-manager.d.ts.map +1 -1
- package/dist/src/config/config-manager.js +288 -225
- package/dist/src/config/config-manager.js.map +1 -1
- package/dist/src/constants/api.constants.d.ts +6 -0
- package/dist/src/constants/api.constants.d.ts.map +1 -1
- package/dist/src/constants/api.constants.js +7 -1
- package/dist/src/constants/api.constants.js.map +1 -1
- package/dist/src/constants/auth.constants.d.ts +11 -0
- package/dist/src/constants/auth.constants.d.ts.map +1 -1
- package/dist/src/constants/auth.constants.js +12 -1
- package/dist/src/constants/auth.constants.js.map +1 -1
- package/dist/src/constants/device.constants.d.ts +1 -7
- package/dist/src/constants/device.constants.d.ts.map +1 -1
- package/dist/src/constants/device.constants.js +2 -11
- package/dist/src/constants/device.constants.js.map +1 -1
- package/dist/src/constants/time.constants.d.ts +0 -2
- package/dist/src/constants/time.constants.d.ts.map +1 -1
- package/dist/src/constants/time.constants.js +1 -3
- package/dist/src/constants/time.constants.js.map +1 -1
- package/dist/src/device/accessory-factory.d.ts +0 -5
- package/dist/src/device/accessory-factory.d.ts.map +1 -1
- package/dist/src/device/accessory-factory.js +0 -7
- package/dist/src/device/accessory-factory.js.map +1 -1
- package/dist/src/device/capability-detector.d.ts +9 -1
- package/dist/src/device/capability-detector.d.ts.map +1 -1
- package/dist/src/device/capability-detector.js +32 -28
- package/dist/src/device/capability-detector.js.map +1 -1
- package/dist/src/device/capability-docs.d.ts.map +1 -1
- package/dist/src/device/capability-docs.js +3 -0
- package/dist/src/device/capability-docs.js.map +1 -1
- package/dist/src/device/data-paths.d.ts +18 -0
- package/dist/src/device/data-paths.d.ts.map +1 -0
- package/dist/src/device/data-paths.js +20 -0
- package/dist/src/device/data-paths.js.map +1 -0
- package/dist/src/device/profiles/device-profile.d.ts +0 -5
- package/dist/src/device/profiles/device-profile.d.ts.map +1 -1
- package/dist/src/device/profiles/device-profile.js +0 -21
- package/dist/src/device/profiles/device-profile.js.map +1 -1
- package/dist/src/features/base-feature.d.ts +53 -9
- package/dist/src/features/base-feature.d.ts.map +1 -1
- package/dist/src/features/base-feature.js +93 -40
- package/dist/src/features/base-feature.js.map +1 -1
- package/dist/src/features/feature-manager.d.ts +27 -15
- package/dist/src/features/feature-manager.d.ts.map +1 -1
- package/dist/src/features/feature-manager.js +27 -24
- package/dist/src/features/feature-manager.js.map +1 -1
- package/dist/src/features/index.d.ts +1 -0
- package/dist/src/features/index.d.ts.map +1 -1
- package/dist/src/features/index.js +1 -0
- package/dist/src/features/index.js.map +1 -1
- package/dist/src/features/modes/auto-fan-mode.feature.d.ts +16 -10
- package/dist/src/features/modes/auto-fan-mode.feature.d.ts.map +1 -1
- package/dist/src/features/modes/auto-fan-mode.feature.js +16 -40
- package/dist/src/features/modes/auto-fan-mode.feature.js.map +1 -1
- package/dist/src/features/modes/dry-operation-mode.feature.d.ts +12 -9
- package/dist/src/features/modes/dry-operation-mode.feature.d.ts.map +1 -1
- package/dist/src/features/modes/dry-operation-mode.feature.js +11 -30
- package/dist/src/features/modes/dry-operation-mode.feature.js.map +1 -1
- package/dist/src/features/modes/econo-mode.feature.d.ts +12 -9
- package/dist/src/features/modes/econo-mode.feature.d.ts.map +1 -1
- package/dist/src/features/modes/econo-mode.feature.js +11 -31
- package/dist/src/features/modes/econo-mode.feature.js.map +1 -1
- package/dist/src/features/modes/fan-only-operation-mode.feature.d.ts +12 -9
- package/dist/src/features/modes/fan-only-operation-mode.feature.d.ts.map +1 -1
- package/dist/src/features/modes/fan-only-operation-mode.feature.js +11 -30
- package/dist/src/features/modes/fan-only-operation-mode.feature.js.map +1 -1
- package/dist/src/features/modes/firmware-update.feature.d.ts +7 -6
- package/dist/src/features/modes/firmware-update.feature.d.ts.map +1 -1
- package/dist/src/features/modes/firmware-update.feature.js +15 -22
- package/dist/src/features/modes/firmware-update.feature.js.map +1 -1
- package/dist/src/features/modes/holiday-mode.feature.d.ts +2 -1
- package/dist/src/features/modes/holiday-mode.feature.d.ts.map +1 -1
- package/dist/src/features/modes/holiday-mode.feature.js +5 -15
- package/dist/src/features/modes/holiday-mode.feature.js.map +1 -1
- package/dist/src/features/modes/indoor-silent-mode.feature.d.ts +15 -12
- package/dist/src/features/modes/indoor-silent-mode.feature.d.ts.map +1 -1
- package/dist/src/features/modes/indoor-silent-mode.feature.js +15 -39
- package/dist/src/features/modes/indoor-silent-mode.feature.js.map +1 -1
- package/dist/src/features/modes/oscillation-mode.feature.d.ts +5 -6
- package/dist/src/features/modes/oscillation-mode.feature.d.ts.map +1 -1
- package/dist/src/features/modes/oscillation-mode.feature.js +14 -36
- package/dist/src/features/modes/oscillation-mode.feature.js.map +1 -1
- package/dist/src/features/modes/outdoor-silent-mode.feature.d.ts +12 -9
- package/dist/src/features/modes/outdoor-silent-mode.feature.d.ts.map +1 -1
- package/dist/src/features/modes/outdoor-silent-mode.feature.js +11 -31
- package/dist/src/features/modes/outdoor-silent-mode.feature.js.map +1 -1
- package/dist/src/features/modes/powerful-mode.feature.d.ts +14 -10
- package/dist/src/features/modes/powerful-mode.feature.d.ts.map +1 -1
- package/dist/src/features/modes/powerful-mode.feature.js +13 -32
- package/dist/src/features/modes/powerful-mode.feature.js.map +1 -1
- package/dist/src/features/modes/streamer-mode.feature.d.ts +12 -9
- package/dist/src/features/modes/streamer-mode.feature.d.ts.map +1 -1
- package/dist/src/features/modes/streamer-mode.feature.js +11 -31
- package/dist/src/features/modes/streamer-mode.feature.js.map +1 -1
- package/dist/src/features/on-off-data-point-feature.d.ts +43 -0
- package/dist/src/features/on-off-data-point-feature.d.ts.map +1 -0
- package/dist/src/features/on-off-data-point-feature.js +49 -0
- package/dist/src/features/on-off-data-point-feature.js.map +1 -0
- package/dist/src/platform.d.ts +56 -9
- package/dist/src/platform.d.ts.map +1 -1
- package/dist/src/platform.js +248 -128
- package/dist/src/platform.js.map +1 -1
- package/dist/src/services/climate-control/fan-speed.d.ts +45 -0
- package/dist/src/services/climate-control/fan-speed.d.ts.map +1 -0
- package/dist/src/services/climate-control/fan-speed.js +104 -0
- package/dist/src/services/climate-control/fan-speed.js.map +1 -0
- package/dist/src/services/climate-control/separate-fan.service.d.ts +45 -0
- package/dist/src/services/climate-control/separate-fan.service.d.ts.map +1 -0
- package/dist/src/services/climate-control/separate-fan.service.js +82 -0
- package/dist/src/services/climate-control/separate-fan.service.js.map +1 -0
- package/dist/src/services/climate-control/setpoint-resolver.d.ts +68 -0
- package/dist/src/services/climate-control/setpoint-resolver.d.ts.map +1 -0
- package/dist/src/services/climate-control/setpoint-resolver.js +170 -0
- package/dist/src/services/climate-control/setpoint-resolver.js.map +1 -0
- package/dist/src/services/climate-control/swing-controller.d.ts +28 -0
- package/dist/src/services/climate-control/swing-controller.d.ts.map +1 -0
- package/dist/src/services/climate-control/swing-controller.js +65 -0
- package/dist/src/services/climate-control/swing-controller.js.map +1 -0
- package/dist/src/services/climate-control.service.d.ts +39 -48
- package/dist/src/services/climate-control.service.d.ts.map +1 -1
- package/dist/src/services/climate-control.service.js +223 -554
- package/dist/src/services/climate-control.service.js.map +1 -1
- package/dist/src/services/hot-water-tank.service.d.ts +17 -8
- package/dist/src/services/hot-water-tank.service.d.ts.map +1 -1
- package/dist/src/services/hot-water-tank.service.js +102 -157
- package/dist/src/services/hot-water-tank.service.js.map +1 -1
- package/dist/src/types/daikin-enums.d.ts +0 -5
- package/dist/src/types/daikin-enums.d.ts.map +1 -1
- package/dist/src/types/daikin-enums.js +1 -7
- package/dist/src/types/daikin-enums.js.map +1 -1
- package/dist/src/types/device-capabilities.d.ts +1 -0
- package/dist/src/types/device-capabilities.d.ts.map +1 -1
- package/dist/src/utils/errors.d.ts +9 -0
- package/dist/src/utils/errors.d.ts.map +1 -0
- package/dist/src/utils/errors.js +25 -0
- package/dist/src/utils/errors.js.map +1 -0
- package/dist/src/utils/hap-write.d.ts +22 -0
- package/dist/src/utils/hap-write.d.ts.map +1 -0
- package/dist/src/utils/hap-write.js +33 -0
- package/dist/src/utils/hap-write.js.map +1 -0
- package/dist/src/utils/sleep.d.ts +5 -0
- package/dist/src/utils/sleep.d.ts.map +1 -0
- package/dist/src/utils/sleep.js +10 -0
- package/dist/src/utils/sleep.js.map +1 -0
- package/homebridge-ui/README.md +25 -2
- package/homebridge-ui/public/index.html +19 -17
- package/homebridge-ui/public/script.js +95 -32
- package/homebridge-ui/public/styles.css +109 -0
- package/homebridge-ui/server.js +321 -125
- package/package.json +2 -3
- package/dist/src/utils/log-context.d.ts +0 -105
- package/dist/src/utils/log-context.d.ts.map +0 -1
- package/dist/src/utils/log-context.js +0 -206
- package/dist/src/utils/log-context.js.map +0 -1
- package/dist/src/utils/update-mapper.d.ts +0 -59
- package/dist/src/utils/update-mapper.d.ts.map +0 -1
- package/dist/src/utils/update-mapper.js +0 -192
- package/dist/src/utils/update-mapper.js.map +0 -1
|
@@ -9,6 +9,9 @@
|
|
|
9
9
|
* - ON -> fanSpeed/currentMode = 'auto'
|
|
10
10
|
* - OFF -> fanSpeed/currentMode = 'fixed' (back to manual speed control)
|
|
11
11
|
*
|
|
12
|
+
* Only supported when the device can toggle between 'auto' and 'fixed' —
|
|
13
|
+
* otherwise the switch would have nothing to turn off to.
|
|
14
|
+
*
|
|
12
15
|
* Moving the RotationSpeed slider switches currentMode back to 'fixed'
|
|
13
16
|
* (see ClimateControlService.handleRotationSpeedSet), which turns this switch off
|
|
14
17
|
* on the next refresh. Mutually exclusive with the Indoor silent (quiet) switch:
|
|
@@ -16,47 +19,20 @@
|
|
|
16
19
|
*/
|
|
17
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
21
|
exports.AutoFanModeFeature = void 0;
|
|
19
|
-
const
|
|
22
|
+
const on_off_data_point_feature_1 = require("../on-off-data-point-feature");
|
|
20
23
|
const types_1 = require("../../types");
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
if (!currentModeFanControl) {
|
|
34
|
-
return false;
|
|
35
|
-
}
|
|
36
|
-
const fanSpeedValues = currentModeFanControl.values || [];
|
|
37
|
-
// Only meaningful when the device can toggle between 'auto' and a manual
|
|
38
|
-
// ('fixed') speed — otherwise the switch would have nothing to turn off to.
|
|
39
|
-
const hasAutoMode = fanSpeedValues.includes(types_1.DaikinFanSpeedModes.AUTO) &&
|
|
40
|
-
fanSpeedValues.includes(types_1.DaikinFanSpeedModes.FIXED);
|
|
41
|
-
this.log.debug(`[${this.name}] hasAutoFanModeFeature: ${hasAutoMode}`);
|
|
42
|
-
return hasAutoMode;
|
|
43
|
-
}
|
|
44
|
-
async handleGet() {
|
|
45
|
-
const data = this.getData('fanControl', `/operationModes/${this.getCurrentOperationMode()}/fanSpeed/currentMode`);
|
|
46
|
-
const isOn = data?.value === types_1.DaikinFanSpeedModes.AUTO;
|
|
47
|
-
this.log.debug(`[${this.name}] GET AutoFanMode: ${isOn}, ` +
|
|
48
|
-
`last update: ${this.accessory.context.device.getLastUpdated()}`);
|
|
49
|
-
return isOn;
|
|
50
|
-
}
|
|
51
|
-
async handleSet(value) {
|
|
52
|
-
this.log.debug(`[${this.name}] SET AutoFanMode to: ${value}`);
|
|
53
|
-
const mode = value ? types_1.DaikinFanSpeedModes.AUTO : types_1.DaikinFanSpeedModes.FIXED;
|
|
54
|
-
await this.setData('fanControl', mode, `/operationModes/${this.getCurrentOperationMode()}/fanSpeed/currentMode`);
|
|
55
|
-
}
|
|
56
|
-
getCurrentOperationMode() {
|
|
57
|
-
const data = this.getData('operationMode');
|
|
58
|
-
return data?.value || types_1.DaikinOperationModes.AUTO;
|
|
59
|
-
}
|
|
24
|
+
const data_paths_1 = require("../../device/data-paths");
|
|
25
|
+
class AutoFanModeFeature extends on_off_data_point_feature_1.OnOffDataPointFeature {
|
|
26
|
+
spec = {
|
|
27
|
+
name: 'Auto fan mode',
|
|
28
|
+
subtype: 'auto_fan_mode',
|
|
29
|
+
configKey: 'showAutoFanMode',
|
|
30
|
+
dataPoint: 'fanControl',
|
|
31
|
+
path: data_paths_1.DataPaths.fanSpeedCurrentMode,
|
|
32
|
+
onValue: types_1.DaikinFanSpeedModes.AUTO,
|
|
33
|
+
offValue: types_1.DaikinFanSpeedModes.FIXED,
|
|
34
|
+
capability: 'hasAutoFanMode',
|
|
35
|
+
};
|
|
60
36
|
}
|
|
61
37
|
exports.AutoFanModeFeature = AutoFanModeFeature;
|
|
62
38
|
//# sourceMappingURL=auto-fan-mode.feature.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auto-fan-mode.feature.js","sourceRoot":"","sources":["../../../../src/features/modes/auto-fan-mode.feature.ts"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"auto-fan-mode.feature.js","sourceRoot":"","sources":["../../../../src/features/modes/auto-fan-mode.feature.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;AAEH,4EAAqE;AACrE,uCAAkD;AAClD,wDAAoD;AAEpD,MAAa,kBAAmB,SAAQ,iDAAqB;IACxC,IAAI,GAAG;QACxB,IAAI,EAAE,eAAe;QACrB,OAAO,EAAE,eAAe;QACxB,SAAS,EAAE,iBAAiB;QAC5B,SAAS,EAAE,YAAY;QACvB,IAAI,EAAE,sBAAS,CAAC,mBAAmB;QACnC,OAAO,EAAE,2BAAmB,CAAC,IAAI;QACjC,QAAQ,EAAE,2BAAmB,CAAC,KAAK;QACnC,UAAU,EAAE,gBAAgB;KACpB,CAAC;CACZ;AAXD,gDAWC"}
|
|
@@ -4,14 +4,17 @@
|
|
|
4
4
|
* Enables/disables the dry operation mode on the device.
|
|
5
5
|
* When disabled, switches back to auto mode.
|
|
6
6
|
*/
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
export declare class DryOperationModeFeature extends
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
7
|
+
import { OnOffDataPointFeature } from '../on-off-data-point-feature';
|
|
8
|
+
import { DaikinOperationModes } from '../../types';
|
|
9
|
+
export declare class DryOperationModeFeature extends OnOffDataPointFeature {
|
|
10
|
+
protected readonly spec: {
|
|
11
|
+
readonly name: "Dry operation mode";
|
|
12
|
+
readonly subtype: "dry_operation_mode";
|
|
13
|
+
readonly configKey: "showDryMode";
|
|
14
|
+
readonly dataPoint: "operationMode";
|
|
15
|
+
readonly onValue: DaikinOperationModes.DRY;
|
|
16
|
+
readonly offValue: DaikinOperationModes.AUTO;
|
|
17
|
+
readonly capability: "hasDryOperationMode";
|
|
18
|
+
};
|
|
16
19
|
}
|
|
17
20
|
//# sourceMappingURL=dry-operation-mode.feature.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dry-operation-mode.feature.d.ts","sourceRoot":"","sources":["../../../../src/features/modes/dry-operation-mode.feature.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"dry-operation-mode.feature.d.ts","sourceRoot":"","sources":["../../../../src/features/modes/dry-operation-mode.feature.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEnD,qBAAa,uBAAwB,SAAQ,qBAAqB;IAChE,SAAS,CAAC,QAAQ,CAAC,IAAI;;;;;;;;MAQZ;CACZ"}
|
|
@@ -7,37 +7,18 @@
|
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.DryOperationModeFeature = void 0;
|
|
10
|
-
const
|
|
10
|
+
const on_off_data_point_feature_1 = require("../on-off-data-point-feature");
|
|
11
11
|
const types_1 = require("../../types");
|
|
12
|
-
class DryOperationModeFeature extends
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
isSupported() {
|
|
23
|
-
const operationModeData = this.getData('operationMode');
|
|
24
|
-
const operationModeValues = operationModeData?.values || [];
|
|
25
|
-
const hasDryMode = operationModeValues.includes(types_1.DaikinOperationModes.DRY);
|
|
26
|
-
this.log.debug(`[${this.name}] hasDryOperationModeFeature: ${hasDryMode}`);
|
|
27
|
-
return hasDryMode;
|
|
28
|
-
}
|
|
29
|
-
async handleGet() {
|
|
30
|
-
const data = this.getData('operationMode');
|
|
31
|
-
const isOn = data?.value === types_1.DaikinOperationModes.DRY;
|
|
32
|
-
this.log.debug(`[${this.name}] GET DryOperationMode: ${isOn}, ` +
|
|
33
|
-
`last update: ${this.accessory.context.device.getLastUpdated()}`);
|
|
34
|
-
return isOn;
|
|
35
|
-
}
|
|
36
|
-
async handleSet(value) {
|
|
37
|
-
this.log.debug(`[${this.name}] SET DryOperationMode to: ${value}`);
|
|
38
|
-
const mode = value ? types_1.DaikinOperationModes.DRY : types_1.DaikinOperationModes.AUTO;
|
|
39
|
-
await this.setData('operationMode', mode);
|
|
40
|
-
}
|
|
12
|
+
class DryOperationModeFeature extends on_off_data_point_feature_1.OnOffDataPointFeature {
|
|
13
|
+
spec = {
|
|
14
|
+
name: 'Dry operation mode',
|
|
15
|
+
subtype: 'dry_operation_mode',
|
|
16
|
+
configKey: 'showDryMode',
|
|
17
|
+
dataPoint: 'operationMode',
|
|
18
|
+
onValue: types_1.DaikinOperationModes.DRY,
|
|
19
|
+
offValue: types_1.DaikinOperationModes.AUTO,
|
|
20
|
+
capability: 'hasDryOperationMode',
|
|
21
|
+
};
|
|
41
22
|
}
|
|
42
23
|
exports.DryOperationModeFeature = DryOperationModeFeature;
|
|
43
24
|
//# sourceMappingURL=dry-operation-mode.feature.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dry-operation-mode.feature.js","sourceRoot":"","sources":["../../../../src/features/modes/dry-operation-mode.feature.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;
|
|
1
|
+
{"version":3,"file":"dry-operation-mode.feature.js","sourceRoot":"","sources":["../../../../src/features/modes/dry-operation-mode.feature.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,4EAAqE;AACrE,uCAAmD;AAEnD,MAAa,uBAAwB,SAAQ,iDAAqB;IAC7C,IAAI,GAAG;QACxB,IAAI,EAAE,oBAAoB;QAC1B,OAAO,EAAE,oBAAoB;QAC7B,SAAS,EAAE,aAAa;QACxB,SAAS,EAAE,eAAe;QAC1B,OAAO,EAAE,4BAAoB,CAAC,GAAG;QACjC,QAAQ,EAAE,4BAAoB,CAAC,IAAI;QACnC,UAAU,EAAE,qBAAqB;KACzB,CAAC;CACZ;AAVD,0DAUC"}
|
|
@@ -3,14 +3,17 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Enables/disables the economy mode on the device.
|
|
5
5
|
*/
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
export declare class EconoModeFeature extends
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
6
|
+
import { OnOffDataPointFeature } from '../on-off-data-point-feature';
|
|
7
|
+
import { DaikinEconoModes } from '../../types';
|
|
8
|
+
export declare class EconoModeFeature extends OnOffDataPointFeature {
|
|
9
|
+
protected readonly spec: {
|
|
10
|
+
readonly name: "Econo mode";
|
|
11
|
+
readonly subtype: "econo_mode";
|
|
12
|
+
readonly configKey: "showEconoMode";
|
|
13
|
+
readonly dataPoint: "econoMode";
|
|
14
|
+
readonly onValue: DaikinEconoModes.ON;
|
|
15
|
+
readonly offValue: DaikinEconoModes.OFF;
|
|
16
|
+
readonly capability: "hasEconoMode";
|
|
17
|
+
};
|
|
15
18
|
}
|
|
16
19
|
//# sourceMappingURL=econo-mode.feature.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"econo-mode.feature.d.ts","sourceRoot":"","sources":["../../../../src/features/modes/econo-mode.feature.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"econo-mode.feature.d.ts","sourceRoot":"","sources":["../../../../src/features/modes/econo-mode.feature.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,qBAAa,gBAAiB,SAAQ,qBAAqB;IACzD,SAAS,CAAC,QAAQ,CAAC,IAAI;;;;;;;;MAQZ;CACZ"}
|
|
@@ -6,38 +6,18 @@
|
|
|
6
6
|
*/
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
8
|
exports.EconoModeFeature = void 0;
|
|
9
|
-
const
|
|
9
|
+
const on_off_data_point_feature_1 = require("../on-off-data-point-feature");
|
|
10
10
|
const types_1 = require("../../types");
|
|
11
|
-
class EconoModeFeature extends
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
isSupported() {
|
|
22
|
-
// device.getData() returns { value: undefined } when the characteristic is missing,
|
|
23
|
-
// so Boolean(data) is always true. Check the inner value to detect real support.
|
|
24
|
-
const econoMode = this.getData('econoMode');
|
|
25
|
-
const supported = econoMode?.value !== undefined;
|
|
26
|
-
this.log.debug(`[${this.name}] hasEconoModeFeature: ${supported}`);
|
|
27
|
-
return supported;
|
|
28
|
-
}
|
|
29
|
-
async handleGet() {
|
|
30
|
-
const data = this.getData('econoMode');
|
|
31
|
-
const isOn = data?.value === types_1.DaikinEconoModes.ON;
|
|
32
|
-
this.log.debug(`[${this.name}] GET EconoMode: ${isOn}, ` +
|
|
33
|
-
`last update: ${this.accessory.context.device.getLastUpdated()}`);
|
|
34
|
-
return isOn;
|
|
35
|
-
}
|
|
36
|
-
async handleSet(value) {
|
|
37
|
-
this.log.debug(`[${this.name}] SET EconoMode to: ${value}`);
|
|
38
|
-
const mode = value ? types_1.DaikinEconoModes.ON : types_1.DaikinEconoModes.OFF;
|
|
39
|
-
await this.setData('econoMode', mode);
|
|
40
|
-
}
|
|
11
|
+
class EconoModeFeature extends on_off_data_point_feature_1.OnOffDataPointFeature {
|
|
12
|
+
spec = {
|
|
13
|
+
name: 'Econo mode',
|
|
14
|
+
subtype: 'econo_mode',
|
|
15
|
+
configKey: 'showEconoMode',
|
|
16
|
+
dataPoint: 'econoMode',
|
|
17
|
+
onValue: types_1.DaikinEconoModes.ON,
|
|
18
|
+
offValue: types_1.DaikinEconoModes.OFF,
|
|
19
|
+
capability: 'hasEconoMode',
|
|
20
|
+
};
|
|
41
21
|
}
|
|
42
22
|
exports.EconoModeFeature = EconoModeFeature;
|
|
43
23
|
//# sourceMappingURL=econo-mode.feature.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"econo-mode.feature.js","sourceRoot":"","sources":["../../../../src/features/modes/econo-mode.feature.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;
|
|
1
|
+
{"version":3,"file":"econo-mode.feature.js","sourceRoot":"","sources":["../../../../src/features/modes/econo-mode.feature.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,4EAAqE;AACrE,uCAA+C;AAE/C,MAAa,gBAAiB,SAAQ,iDAAqB;IACtC,IAAI,GAAG;QACxB,IAAI,EAAE,YAAY;QAClB,OAAO,EAAE,YAAY;QACrB,SAAS,EAAE,eAAe;QAC1B,SAAS,EAAE,WAAW;QACtB,OAAO,EAAE,wBAAgB,CAAC,EAAE;QAC5B,QAAQ,EAAE,wBAAgB,CAAC,GAAG;QAC9B,UAAU,EAAE,cAAc;KAClB,CAAC;CACZ;AAVD,4CAUC"}
|
|
@@ -4,14 +4,17 @@
|
|
|
4
4
|
* Enables/disables the fan only operation mode on the device.
|
|
5
5
|
* When disabled, switches back to auto mode.
|
|
6
6
|
*/
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
export declare class FanOnlyOperationModeFeature extends
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
7
|
+
import { OnOffDataPointFeature } from '../on-off-data-point-feature';
|
|
8
|
+
import { DaikinOperationModes } from '../../types';
|
|
9
|
+
export declare class FanOnlyOperationModeFeature extends OnOffDataPointFeature {
|
|
10
|
+
protected readonly spec: {
|
|
11
|
+
readonly name: "Fan only operation mode";
|
|
12
|
+
readonly subtype: "fan_only_operation_mode";
|
|
13
|
+
readonly configKey: "showFanOnlyMode";
|
|
14
|
+
readonly dataPoint: "operationMode";
|
|
15
|
+
readonly onValue: DaikinOperationModes.FAN_ONLY;
|
|
16
|
+
readonly offValue: DaikinOperationModes.AUTO;
|
|
17
|
+
readonly capability: "hasFanOnlyOperationMode";
|
|
18
|
+
};
|
|
16
19
|
}
|
|
17
20
|
//# sourceMappingURL=fan-only-operation-mode.feature.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fan-only-operation-mode.feature.d.ts","sourceRoot":"","sources":["../../../../src/features/modes/fan-only-operation-mode.feature.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"fan-only-operation-mode.feature.d.ts","sourceRoot":"","sources":["../../../../src/features/modes/fan-only-operation-mode.feature.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEnD,qBAAa,2BAA4B,SAAQ,qBAAqB;IACpE,SAAS,CAAC,QAAQ,CAAC,IAAI;;;;;;;;MAQZ;CACZ"}
|
|
@@ -7,37 +7,18 @@
|
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.FanOnlyOperationModeFeature = void 0;
|
|
10
|
-
const
|
|
10
|
+
const on_off_data_point_feature_1 = require("../on-off-data-point-feature");
|
|
11
11
|
const types_1 = require("../../types");
|
|
12
|
-
class FanOnlyOperationModeFeature extends
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
isSupported() {
|
|
23
|
-
const operationModeData = this.getData('operationMode');
|
|
24
|
-
const operationModeValues = operationModeData?.values || [];
|
|
25
|
-
const hasFanOnlyMode = operationModeValues.includes(types_1.DaikinOperationModes.FAN_ONLY);
|
|
26
|
-
this.log.debug(`[${this.name}] hasFanOnlyOperationModeFeature: ${hasFanOnlyMode}`);
|
|
27
|
-
return hasFanOnlyMode;
|
|
28
|
-
}
|
|
29
|
-
async handleGet() {
|
|
30
|
-
const data = this.getData('operationMode');
|
|
31
|
-
const isOn = data?.value === types_1.DaikinOperationModes.FAN_ONLY;
|
|
32
|
-
this.log.debug(`[${this.name}] GET FanOnlyOperationMode: ${isOn}, ` +
|
|
33
|
-
`last update: ${this.accessory.context.device.getLastUpdated()}`);
|
|
34
|
-
return isOn;
|
|
35
|
-
}
|
|
36
|
-
async handleSet(value) {
|
|
37
|
-
this.log.debug(`[${this.name}] SET FanOnlyOperationMode to: ${value}`);
|
|
38
|
-
const mode = value ? types_1.DaikinOperationModes.FAN_ONLY : types_1.DaikinOperationModes.AUTO;
|
|
39
|
-
await this.setData('operationMode', mode);
|
|
40
|
-
}
|
|
12
|
+
class FanOnlyOperationModeFeature extends on_off_data_point_feature_1.OnOffDataPointFeature {
|
|
13
|
+
spec = {
|
|
14
|
+
name: 'Fan only operation mode',
|
|
15
|
+
subtype: 'fan_only_operation_mode',
|
|
16
|
+
configKey: 'showFanOnlyMode',
|
|
17
|
+
dataPoint: 'operationMode',
|
|
18
|
+
onValue: types_1.DaikinOperationModes.FAN_ONLY,
|
|
19
|
+
offValue: types_1.DaikinOperationModes.AUTO,
|
|
20
|
+
capability: 'hasFanOnlyOperationMode',
|
|
21
|
+
};
|
|
41
22
|
}
|
|
42
23
|
exports.FanOnlyOperationModeFeature = FanOnlyOperationModeFeature;
|
|
43
24
|
//# sourceMappingURL=fan-only-operation-mode.feature.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fan-only-operation-mode.feature.js","sourceRoot":"","sources":["../../../../src/features/modes/fan-only-operation-mode.feature.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;
|
|
1
|
+
{"version":3,"file":"fan-only-operation-mode.feature.js","sourceRoot":"","sources":["../../../../src/features/modes/fan-only-operation-mode.feature.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,4EAAqE;AACrE,uCAAmD;AAEnD,MAAa,2BAA4B,SAAQ,iDAAqB;IACjD,IAAI,GAAG;QACxB,IAAI,EAAE,yBAAyB;QAC/B,OAAO,EAAE,yBAAyB;QAClC,SAAS,EAAE,iBAAiB;QAC5B,SAAS,EAAE,eAAe;QAC1B,OAAO,EAAE,4BAAoB,CAAC,QAAQ;QACtC,QAAQ,EAAE,4BAAoB,CAAC,IAAI;QACnC,UAAU,EAAE,yBAAyB;KAC7B,CAAC;CACZ;AAVD,kEAUC"}
|
|
@@ -10,19 +10,20 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import type { CharacteristicValue } from 'homebridge';
|
|
12
12
|
import { BaseFeature } from '../base-feature';
|
|
13
|
+
import type { FeatureConfigKey } from '../../config/config-manager';
|
|
13
14
|
export declare class FirmwareUpdateFeature extends BaseFeature {
|
|
14
15
|
private announcedVersion?;
|
|
15
16
|
private announcedStatus?;
|
|
16
17
|
get featureName(): string;
|
|
17
18
|
get serviceSubtype(): string;
|
|
18
|
-
get configKey(): string;
|
|
19
|
-
isSupported(): boolean;
|
|
20
19
|
/**
|
|
21
|
-
*
|
|
22
|
-
* catch-all
|
|
23
|
-
*
|
|
20
|
+
* A standalone toggle: unlike other features it never inherits the legacy
|
|
21
|
+
* `showExtraFeatures` catch-all (see FEATURE_CONFIG_KEYS). A switch that
|
|
22
|
+
* installs firmware should only appear when explicitly enabled, so an
|
|
23
|
+
* all-switches scene can't trigger it unnoticed.
|
|
24
24
|
*/
|
|
25
|
-
|
|
25
|
+
get configKey(): FeatureConfigKey;
|
|
26
|
+
isSupported(): boolean;
|
|
26
27
|
handleGet(): Promise<CharacteristicValue>;
|
|
27
28
|
handleSet(value: CharacteristicValue): Promise<void>;
|
|
28
29
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"firmware-update.feature.d.ts","sourceRoot":"","sources":["../../../../src/features/modes/firmware-update.feature.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"firmware-update.feature.d.ts","sourceRoot":"","sources":["../../../../src/features/modes/firmware-update.feature.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAKpE,qBAAa,qBAAsB,SAAQ,WAAW;IACpD,OAAO,CAAC,gBAAgB,CAAC,CAAS;IAClC,OAAO,CAAC,eAAe,CAAC,CAAS;IAEjC,IAAI,WAAW,IAAI,MAAM,CAExB;IAED,IAAI,cAAc,IAAI,MAAM,CAE3B;IAED;;;;;OAKG;IACH,IAAI,SAAS,IAAI,gBAAgB,CAEhC;IAED,WAAW,IAAI,OAAO;IAMhB,SAAS,IAAI,OAAO,CAAC,mBAAmB,CAAC;IAIzC,SAAS,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC;IAW1D;;OAEG;IACH,OAAO,IAAI,IAAI;IAMf,OAAO,KAAK,SAAS,GAEpB;IAED,OAAO,KAAK,YAAY,GAGvB;YAEa,mBAAmB;YAUnB,cAAc;IAW5B,OAAO,CAAC,aAAa;IAOrB;;;;OAIG;IACH,OAAO,CAAC,cAAc;IAMtB,OAAO,CAAC,oBAAoB;IAU5B,OAAO,CAAC,eAAe;CASxB"}
|
|
@@ -23,21 +23,19 @@ class FirmwareUpdateFeature extends base_feature_1.BaseFeature {
|
|
|
23
23
|
get serviceSubtype() {
|
|
24
24
|
return 'firmware_update';
|
|
25
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* A standalone toggle: unlike other features it never inherits the legacy
|
|
28
|
+
* `showExtraFeatures` catch-all (see FEATURE_CONFIG_KEYS). A switch that
|
|
29
|
+
* installs firmware should only appear when explicitly enabled, so an
|
|
30
|
+
* all-switches scene can't trigger it unnoticed.
|
|
31
|
+
*/
|
|
26
32
|
get configKey() {
|
|
27
33
|
return 'showFirmwareUpdateSwitch';
|
|
28
34
|
}
|
|
29
35
|
isSupported() {
|
|
30
36
|
const gatewayId = this.gatewayId;
|
|
31
37
|
return gatewayId !== undefined
|
|
32
|
-
&& this.
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Unlike other features, never inherit the legacy `showExtraFeatures`
|
|
36
|
-
* catch-all: a switch that installs firmware should only appear when
|
|
37
|
-
* explicitly enabled, so an all-switches scene can't trigger it unnoticed.
|
|
38
|
-
*/
|
|
39
|
-
isEnabledInConfig() {
|
|
40
|
-
return this.platform.config[this.configKey] === true;
|
|
38
|
+
&& this.device.isFirmwareUpdateSupported(gatewayId);
|
|
41
39
|
}
|
|
42
40
|
async handleGet() {
|
|
43
41
|
return this.updateStatus === IN_PROGRESS;
|
|
@@ -61,15 +59,15 @@ class FirmwareUpdateFeature extends base_feature_1.BaseFeature {
|
|
|
61
59
|
super.refresh();
|
|
62
60
|
}
|
|
63
61
|
get gatewayId() {
|
|
64
|
-
return this.
|
|
62
|
+
return this.device.getManagementPointIdByType('gateway');
|
|
65
63
|
}
|
|
66
64
|
get updateStatus() {
|
|
67
65
|
const gatewayId = this.gatewayId;
|
|
68
|
-
return gatewayId ? this.
|
|
66
|
+
return gatewayId ? this.device.getFirmwareUpdateStatus(gatewayId) : undefined;
|
|
69
67
|
}
|
|
70
68
|
async installStagedUpdate() {
|
|
71
69
|
const gatewayId = this.gatewayId;
|
|
72
|
-
const info = gatewayId ? this.
|
|
70
|
+
const info = gatewayId ? this.device.getFirmwareUpdateInfo(gatewayId) : undefined;
|
|
73
71
|
if (!gatewayId || !info) {
|
|
74
72
|
this.log.info(`[${this.name}] Firmware is up to date — no update staged by Daikin`);
|
|
75
73
|
return this.revertSwitchTo(false);
|
|
@@ -77,15 +75,10 @@ class FirmwareUpdateFeature extends base_feature_1.BaseFeature {
|
|
|
77
75
|
await this.triggerInstall(gatewayId, info.version);
|
|
78
76
|
}
|
|
79
77
|
async triggerInstall(gatewayId, version) {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}
|
|
85
|
-
catch (e) {
|
|
86
|
-
this.log.warn(`[${this.name}] Failed to start firmware update: ${e instanceof Error ? e.message : e}`);
|
|
87
|
-
throw new this.platform.api.hap.HapStatusError(-70402 /* this.platform.api.hap.HAPStatus.SERVICE_COMMUNICATION_FAILURE */);
|
|
88
|
-
}
|
|
78
|
+
// No forced refresh: the update runs for minutes and the poll picks up its status.
|
|
79
|
+
const info = await this.write('firmware update', () => this.device.triggerFirmwareUpdate(gatewayId), false);
|
|
80
|
+
this.log.info(`[${this.name}] Installing firmware update ${info.version ?? version ?? ''} `
|
|
81
|
+
+ '— the unit will be unavailable until it finishes');
|
|
89
82
|
}
|
|
90
83
|
handleTurnOff() {
|
|
91
84
|
if (this.updateStatus === IN_PROGRESS) {
|
|
@@ -105,7 +98,7 @@ class FirmwareUpdateFeature extends base_feature_1.BaseFeature {
|
|
|
105
98
|
}
|
|
106
99
|
announceAvailability() {
|
|
107
100
|
const gatewayId = this.gatewayId;
|
|
108
|
-
const info = gatewayId ? this.
|
|
101
|
+
const info = gatewayId ? this.device.getFirmwareUpdateInfo(gatewayId) : undefined;
|
|
109
102
|
if (info && info.version !== this.announcedVersion) {
|
|
110
103
|
this.announcedVersion = info.version;
|
|
111
104
|
this.log.info(`[${this.name}] Firmware update available: ${info.version ?? 'unknown version'}`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"firmware-update.feature.js","sourceRoot":"","sources":["../../../../src/features/modes/firmware-update.feature.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;AAGH,kDAA8C;
|
|
1
|
+
{"version":3,"file":"firmware-update.feature.js","sourceRoot":"","sources":["../../../../src/features/modes/firmware-update.feature.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;AAGH,kDAA8C;AAG9C,MAAM,WAAW,GAAG,aAAa,CAAC;AAClC,MAAM,sBAAsB,GAAG,IAAI,CAAC;AAEpC,MAAa,qBAAsB,SAAQ,0BAAW;IAC5C,gBAAgB,CAAU;I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{ FeatureConfigKey } from '../../config/config-manager';
|
|
11
12
|
export declare class HolidayModeFeature extends BaseFeature {
|
|
12
13
|
get featureName(): string;
|
|
13
14
|
get serviceSubtype(): string;
|
|
14
|
-
get configKey():
|
|
15
|
+
get configKey(): FeatureConfigKey;
|
|
15
16
|
isSupported(): boolean;
|
|
16
17
|
handleGet(): Promise<CharacteristicValue>;
|
|
17
18
|
handleSet(value: CharacteristicValue): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"holiday-mode.feature.d.ts","sourceRoot":"","sources":["../../../../src/features/modes/holiday-mode.feature.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"holiday-mode.feature.d.ts","sourceRoot":"","sources":["../../../../src/features/modes/holiday-mode.feature.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAEpE,qBAAa,kBAAmB,SAAQ,WAAW;IACjD,IAAI,WAAW,IAAI,MAAM,CAExB;IAED,IAAI,cAAc,IAAI,MAAM,CAE3B;IAED,IAAI,SAAS,IAAI,gBAAgB,CAEhC;IAED,WAAW,IAAI,OAAO;IAMhB,SAAS,IAAI,OAAO,CAAC,mBAAmB,CAAC;IAUzC,SAAS,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC;CAI3D"}
|
|
@@ -21,30 +21,20 @@ class HolidayModeFeature extends base_feature_1.BaseFeature {
|
|
|
21
21
|
return 'showHolidayMode';
|
|
22
22
|
}
|
|
23
23
|
isSupported() {
|
|
24
|
-
|
|
25
|
-
// missing, so check the inner enabled flag to detect real support.
|
|
26
|
-
const holidayMode = this.getData('holidayMode');
|
|
27
|
-
const supported = holidayMode?.value?.enabled !== undefined;
|
|
24
|
+
const supported = this.capabilities.hasHolidayMode;
|
|
28
25
|
this.log.debug(`[${this.name}] hasHolidayModeFeature: ${supported}`);
|
|
29
26
|
return supported;
|
|
30
27
|
}
|
|
31
28
|
async handleGet() {
|
|
32
|
-
const
|
|
33
|
-
const isOn =
|
|
29
|
+
const value = this.getData('holidayMode').value;
|
|
30
|
+
const isOn = value?.enabled === true;
|
|
34
31
|
this.log.debug(`[${this.name}] GET HolidayMode: ${isOn}, ` +
|
|
35
|
-
`last update: ${this.
|
|
32
|
+
`last update: ${this.device.getLastUpdated()}`);
|
|
36
33
|
return isOn;
|
|
37
34
|
}
|
|
38
35
|
async handleSet(value) {
|
|
39
36
|
this.log.debug(`[${this.name}] SET HolidayMode to: ${value}`);
|
|
40
|
-
|
|
41
|
-
await this.accessory.context.device.setHolidayMode(this.managementPointId, Boolean(value));
|
|
42
|
-
this.platform.forceUpdateDevices();
|
|
43
|
-
}
|
|
44
|
-
catch (e) {
|
|
45
|
-
this.log.warn(`[${this.name}] Failed to set holidayMode: ${e instanceof Error ? e.message : e}`);
|
|
46
|
-
throw new this.platform.api.hap.HapStatusError(-70402 /* this.platform.api.hap.HAPStatus.SERVICE_COMMUNICATION_FAILURE */);
|
|
47
|
-
}
|
|
37
|
+
await this.write('holidayMode', () => this.device.setHolidayMode(this.managementPointId, Boolean(value)));
|
|
48
38
|
}
|
|
49
39
|
}
|
|
50
40
|
exports.HolidayModeFeature = HolidayModeFeature;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"holiday-mode.feature.js","sourceRoot":"","sources":["../../../../src/features/modes/holiday-mode.feature.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AAGH,kDAA8C;
|
|
1
|
+
{"version":3,"file":"holiday-mode.feature.js","sourceRoot":"","sources":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indoor Silent Mode Feature
|
|
3
3
|
*
|
|
4
|
-
* Enables/disables the indoor silent (quiet) mode on the device
|
|
5
|
-
*
|
|
4
|
+
* Enables/disables the indoor silent (quiet) mode on the device by switching
|
|
5
|
+
* fanSpeed/currentMode of the current operation mode between 'quiet' and 'fixed'.
|
|
6
6
|
*/
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
export declare class IndoorSilentModeFeature extends
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
7
|
+
import { OnOffDataPointFeature } from '../on-off-data-point-feature';
|
|
8
|
+
import { DaikinFanSpeedModes } from '../../types';
|
|
9
|
+
export declare class IndoorSilentModeFeature extends OnOffDataPointFeature {
|
|
10
|
+
protected readonly spec: {
|
|
11
|
+
readonly name: "Indoor silent mode";
|
|
12
|
+
readonly subtype: "indoor_silent_mode";
|
|
13
|
+
readonly configKey: "showIndoorSilentMode";
|
|
14
|
+
readonly dataPoint: "fanControl";
|
|
15
|
+
readonly path: (operationMode: string) => string;
|
|
16
|
+
readonly onValue: DaikinFanSpeedModes.QUIET;
|
|
17
|
+
readonly offValue: DaikinFanSpeedModes.FIXED;
|
|
18
|
+
readonly capability: "hasIndoorSilentMode";
|
|
19
|
+
};
|
|
17
20
|
}
|
|
18
21
|
//# sourceMappingURL=indoor-silent-mode.feature.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"indoor-silent-mode.feature.d.ts","sourceRoot":"","sources":["../../../../src/features/modes/indoor-silent-mode.feature.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"indoor-silent-mode.feature.d.ts","sourceRoot":"","sources":["../../../../src/features/modes/indoor-silent-mode.feature.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAGlD,qBAAa,uBAAwB,SAAQ,qBAAqB;IAChE,SAAS,CAAC,QAAQ,CAAC,IAAI;;;;;;;;;MASZ;CACZ"}
|