@riddix/hamh 2.1.0-alpha.418 → 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");
|