mysa-js-sdk
    Preparing search index...

    Function mapFanSpeedsByValue

    • Maps a set of raw fn values onto fan speeds by value, via FanSpeedReceiveMap.

      Unlike the positional reading of a top-level SupportedCaps.fanSpeeds list, this is order-independent, which is what a per-mode list requires: a mode that omits a speed (e.g. fan-only offering [3, 5, 7] — low/medium/high, with no auto) would have every speed shifted by one if it were zipped against CanonicalFanSpeedOrder.

      Parameters

      • rawSpeeds: number[]

        The raw fn values the device accepts.

      Returns Partial<Record<MysaFanSpeedMode, number>>

      A partial map from fan speed to fn value, empty when no value is recognized.