@riddix/hamh 2.1.0-alpha.416 → 2.1.0-alpha.418
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/backend/cli.js
CHANGED
|
@@ -165807,15 +165807,16 @@ var FanControlServerBase = class extends FeaturedBase3 {
|
|
|
165807
165807
|
}
|
|
165808
165808
|
const fanModeSequence = this.getFanModeSequence();
|
|
165809
165809
|
const fanMode = config10.isInAutoMode(entity.state, this.agent) ? FanMode.create(FanControl3.FanMode.Auto, fanModeSequence) : FanMode.fromSpeedPercent(percentage, fanModeSequence);
|
|
165810
|
+
const isOff = percentage === 0;
|
|
165810
165811
|
try {
|
|
165811
165812
|
applyPatchState(this.state, {
|
|
165812
|
-
percentSetting: percentage,
|
|
165813
|
+
...isOff ? {} : { percentSetting: percentage },
|
|
165813
165814
|
percentCurrent: percentage,
|
|
165814
165815
|
fanMode: fanMode.mode,
|
|
165815
165816
|
fanModeSequence,
|
|
165816
165817
|
...this.features.multiSpeed ? {
|
|
165817
165818
|
speedMax,
|
|
165818
|
-
speedSetting: speed,
|
|
165819
|
+
...isOff ? {} : { speedSetting: speed },
|
|
165819
165820
|
speedCurrent: speed
|
|
165820
165821
|
} : {},
|
|
165821
165822
|
...this.features.airflowDirection ? {
|
|
@@ -172829,10 +172830,14 @@ var vacuumRvcRunModeConfig = {
|
|
|
172829
172830
|
}
|
|
172830
172831
|
const rooms = parseVacuumRooms(attributes7);
|
|
172831
172832
|
const roomIds = [];
|
|
172833
|
+
let targetMapName;
|
|
172832
172834
|
for (const areaId of selectedAreas) {
|
|
172833
172835
|
const room = rooms.find((r) => toAreaId(r.id) === areaId);
|
|
172834
172836
|
if (room) {
|
|
172835
172837
|
roomIds.push(room.originalId ?? room.id);
|
|
172838
|
+
if (room.mapName && !targetMapName) {
|
|
172839
|
+
targetMapName = room.mapName;
|
|
172840
|
+
}
|
|
172836
172841
|
}
|
|
172837
172842
|
}
|
|
172838
172843
|
if (roomIds.length > 0) {
|
|
@@ -172860,6 +172865,18 @@ var vacuumRvcRunModeConfig = {
|
|
|
172860
172865
|
};
|
|
172861
172866
|
}
|
|
172862
172867
|
if (isDreameVacuum(attributes7)) {
|
|
172868
|
+
if (targetMapName) {
|
|
172869
|
+
const vacName = vacuumEntityId.replace("vacuum.", "");
|
|
172870
|
+
const selectedMapEntity = `select.${vacName}_selected_map`;
|
|
172871
|
+
logger181.info(
|
|
172872
|
+
`Dreame multi-floor: switching to map "${targetMapName}" via ${selectedMapEntity}`
|
|
172873
|
+
);
|
|
172874
|
+
homeAssistant.callAction({
|
|
172875
|
+
action: "select.select_option",
|
|
172876
|
+
target: selectedMapEntity,
|
|
172877
|
+
data: { option: targetMapName }
|
|
172878
|
+
});
|
|
172879
|
+
}
|
|
172863
172880
|
return {
|
|
172864
172881
|
action: "dreame_vacuum.vacuum_clean_segment",
|
|
172865
172882
|
data: {
|
|
@@ -172962,6 +172979,18 @@ var vacuumRvcRunModeConfig = {
|
|
|
172962
172979
|
};
|
|
172963
172980
|
}
|
|
172964
172981
|
if (isDreameVacuum(attributes7)) {
|
|
172982
|
+
if (room.mapName) {
|
|
172983
|
+
const vacuumName = vacuumEntityId.replace("vacuum.", "");
|
|
172984
|
+
const selectedMapEntity = `select.${vacuumName}_selected_map`;
|
|
172985
|
+
logger181.info(
|
|
172986
|
+
`Dreame multi-floor: switching to map "${room.mapName}" via ${selectedMapEntity}`
|
|
172987
|
+
);
|
|
172988
|
+
homeAssistant.callAction({
|
|
172989
|
+
action: "select.select_option",
|
|
172990
|
+
target: selectedMapEntity,
|
|
172991
|
+
data: { option: room.mapName }
|
|
172992
|
+
});
|
|
172993
|
+
}
|
|
172965
172994
|
logger181.debug(
|
|
172966
172995
|
`Dreame vacuum detected, using dreame_vacuum.vacuum_clean_segment for room ${room.name} (commandId: ${commandId3}, id: ${room.id})`
|
|
172967
172996
|
);
|