edilkamin
    Preparing search index...

    Variable setChronoTemperatureRanges

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

    Type Declaration

      • (jwtToken: string, macAddress: string, ranges: number[]): Promise<unknown>
      • Sets the weekly temperature 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 auto/temperature mode (is_auto = true). For power mode, use setChronoPowerRanges() 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=Economy, 2=Comfort).

        Returns Promise<unknown>

        • A promise that resolves to the command response.

        If ranges array length is not exactly 336.

        // Simple schedule: weekdays 08:00-18:00 Comfort, rest OFF
        const schedule = new Array(336).fill(0);
        for (let day = 0; day < 5; day++) { // Mon-Fri
        for (let hour = 8; hour < 18; hour++) {
        schedule[day * 48 + hour * 2] = 2; // On the hour
        schedule[day * 48 + hour * 2 + 1] = 2; // Half past
        }
        }
        await setChronoTemperatureRanges(token, mac, schedule);