@apocaliss92/nodedreame 1.6.0 → 1.6.1
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/dist/index.cjs +15 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +15 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -73,7 +73,7 @@ module.exports = __toCommonJS(index_exports);
|
|
|
73
73
|
|
|
74
74
|
// src/support/version.ts
|
|
75
75
|
var LIBRARY_NAME = "nodedreame";
|
|
76
|
-
var LIBRARY_VERSION = "1.6.
|
|
76
|
+
var LIBRARY_VERSION = "1.6.1";
|
|
77
77
|
|
|
78
78
|
// src/transport/errors.ts
|
|
79
79
|
var DreameError = class extends Error {
|
|
@@ -2866,6 +2866,20 @@ var VacuumDevice = class _VacuumDevice extends BaseDevice {
|
|
|
2866
2866
|
aiFeature(feature) {
|
|
2867
2867
|
return decodeAiFeature(this.aiDetectionRaw, feature);
|
|
2868
2868
|
}
|
|
2869
|
+
/**
|
|
2870
|
+
* Seed {@link aiDetectionRaw} from the CLOUD SHADOW (the last value the robot
|
|
2871
|
+
* pushed for `AI_DETECTION`, siid 4 piid 22) WITHOUT waking it. The AI-obstacle
|
|
2872
|
+
* toggles are STATIC settings the robot rarely re-pushes over MQTT, so a fresh
|
|
2873
|
+
* connect to an idle robot has no value cached — call this on activate to
|
|
2874
|
+
* surface the current toggles. Emits the usual `propertyChanged`/`stateChanged`
|
|
2875
|
+
* (so a watching consumer re-decodes) and returns the resolved raw value
|
|
2876
|
+
* (`null` when the model has no AI detection or the shadow carries none yet).
|
|
2877
|
+
*/
|
|
2878
|
+
async refreshAiDetection() {
|
|
2879
|
+
if (!this.#caps.hasAiObstacleDetection) return null;
|
|
2880
|
+
await this.refreshCachedProperties([VACUUM_PROP.AI_DETECTION]);
|
|
2881
|
+
return this.aiDetectionRaw;
|
|
2882
|
+
}
|
|
2869
2883
|
/**
|
|
2870
2884
|
* Toggle ONE AI-obstacle feature, preserving the others via a read-modify-write
|
|
2871
2885
|
* of the packed `AI_DETECTION` property (mirrors Tasshack `set_ai_detection`).
|