@riddix/hamh 2.1.0-alpha.417 → 2.1.0-alpha.419
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
|
@@ -169073,6 +169073,21 @@ function FanDevice2(homeAssistantEntity) {
|
|
|
169073
169073
|
);
|
|
169074
169074
|
const presetModes = attributes7.preset_modes ?? [];
|
|
169075
169075
|
const speedPresets = presetModes.filter((m) => m.toLowerCase() !== "auto");
|
|
169076
|
+
if (!hasSetSpeed && speedPresets.length === 0) {
|
|
169077
|
+
const onOffDevice = hasBattery ? OnOffPlugInUnitDevice.with(
|
|
169078
|
+
IdentifyServer2,
|
|
169079
|
+
BasicInformationServer2,
|
|
169080
|
+
HomeAssistantEntityBehavior,
|
|
169081
|
+
FanOnOffServer,
|
|
169082
|
+
FanPowerSourceServer
|
|
169083
|
+
) : OnOffPlugInUnitDevice.with(
|
|
169084
|
+
IdentifyServer2,
|
|
169085
|
+
BasicInformationServer2,
|
|
169086
|
+
HomeAssistantEntityBehavior,
|
|
169087
|
+
FanOnOffServer
|
|
169088
|
+
);
|
|
169089
|
+
return onOffDevice.set({ homeAssistantEntity });
|
|
169090
|
+
}
|
|
169076
169091
|
const features2 = /* @__PURE__ */ new Set();
|
|
169077
169092
|
if (hasSetSpeed || speedPresets.length > 0) {
|
|
169078
169093
|
features2.add("MultiSpeed");
|
|
@@ -172830,10 +172845,14 @@ var vacuumRvcRunModeConfig = {
|
|
|
172830
172845
|
}
|
|
172831
172846
|
const rooms = parseVacuumRooms(attributes7);
|
|
172832
172847
|
const roomIds = [];
|
|
172848
|
+
let targetMapName;
|
|
172833
172849
|
for (const areaId of selectedAreas) {
|
|
172834
172850
|
const room = rooms.find((r) => toAreaId(r.id) === areaId);
|
|
172835
172851
|
if (room) {
|
|
172836
172852
|
roomIds.push(room.originalId ?? room.id);
|
|
172853
|
+
if (room.mapName && !targetMapName) {
|
|
172854
|
+
targetMapName = room.mapName;
|
|
172855
|
+
}
|
|
172837
172856
|
}
|
|
172838
172857
|
}
|
|
172839
172858
|
if (roomIds.length > 0) {
|
|
@@ -172861,6 +172880,18 @@ var vacuumRvcRunModeConfig = {
|
|
|
172861
172880
|
};
|
|
172862
172881
|
}
|
|
172863
172882
|
if (isDreameVacuum(attributes7)) {
|
|
172883
|
+
if (targetMapName) {
|
|
172884
|
+
const vacName = vacuumEntityId.replace("vacuum.", "");
|
|
172885
|
+
const selectedMapEntity = `select.${vacName}_selected_map`;
|
|
172886
|
+
logger181.info(
|
|
172887
|
+
`Dreame multi-floor: switching to map "${targetMapName}" via ${selectedMapEntity}`
|
|
172888
|
+
);
|
|
172889
|
+
homeAssistant.callAction({
|
|
172890
|
+
action: "select.select_option",
|
|
172891
|
+
target: selectedMapEntity,
|
|
172892
|
+
data: { option: targetMapName }
|
|
172893
|
+
});
|
|
172894
|
+
}
|
|
172864
172895
|
return {
|
|
172865
172896
|
action: "dreame_vacuum.vacuum_clean_segment",
|
|
172866
172897
|
data: {
|
|
@@ -172963,6 +172994,18 @@ var vacuumRvcRunModeConfig = {
|
|
|
172963
172994
|
};
|
|
172964
172995
|
}
|
|
172965
172996
|
if (isDreameVacuum(attributes7)) {
|
|
172997
|
+
if (room.mapName) {
|
|
172998
|
+
const vacuumName = vacuumEntityId.replace("vacuum.", "");
|
|
172999
|
+
const selectedMapEntity = `select.${vacuumName}_selected_map`;
|
|
173000
|
+
logger181.info(
|
|
173001
|
+
`Dreame multi-floor: switching to map "${room.mapName}" via ${selectedMapEntity}`
|
|
173002
|
+
);
|
|
173003
|
+
homeAssistant.callAction({
|
|
173004
|
+
action: "select.select_option",
|
|
173005
|
+
target: selectedMapEntity,
|
|
173006
|
+
data: { option: room.mapName }
|
|
173007
|
+
});
|
|
173008
|
+
}
|
|
172966
173009
|
logger181.debug(
|
|
172967
173010
|
`Dreame vacuum detected, using dreame_vacuum.vacuum_clean_segment for room ${room.name} (commandId: ${commandId3}, id: ${room.id})`
|
|
172968
173011
|
);
|