edilkamin
    Preparing search index...

    Variable setChronoPowerRanges

    setChronoPowerRanges: (
        jwtToken: string,
        macAddress: string,
        ranges: number[],
    ) => Promise<unknown>

    Type Declaration

      • (jwtToken: string, macAddress: string, ranges: number[]): Promise<unknown>
      • Sets the weekly power level schedule for Chrono Mode. The schedule is a 336-integer array representing 7 days × 48 time slots (30-min intervals).

        This is used when the device is in manual/power mode (is_auto = false). For temperature mode, use setChronoTemperatureRanges() instead.

        Parameters

        • jwtToken: string

          The JWT token for authentication.

        • macAddress: string

          The MAC address of the device.

        • ranges: number[]

          Array of 336 integers (values: 0=OFF, 1=Power1, 2=Power5).

        Returns Promise<unknown>

        • A promise that resolves to the command response.

        If ranges array length is not exactly 336.

        // Weekend schedule: variable power throughout the day
        const schedule = new Array(336).fill(0);
        const saturday = 5, sunday = 6;

        // Saturday 07:00-12:00 at Power 1 (economy)
        for (let hour = 7; hour < 12; hour++) {
        schedule[saturday * 48 + hour * 2] = 1;
        schedule[saturday * 48 + hour * 2 + 1] = 1;
        }

        await setChronoPowerRanges(token, mac, schedule);