@lucadiba/switchbot-client
    Preparing search index...

    Class DeviceWithPowerToggleBrightnessColor<StatusBody, CommandBody>

    Type Parameters

    Hierarchy (View Summary)

    Index

    Constructors

    • Type Parameters

      • StatusBody extends BaseDeviceWithPowerBrightnessColorStatusBody<
            | "Blind Tilt"
            | "Bot"
            | "Curtain"
            | "Curtain 3"
            | "Hub"
            | "Hub 2"
            | "Hub Plus"
            | "Hub Mini"
            | "Meter"
            | "MeterPlus"
            | "WoIOSensor"
            | "Smart Lock"
            | "Keypad"
            | "Keypad Touch"
            | "Remote"
            | "Motion Sensor"
            | "Contact Sensor"
            | "Ceiling Light"
            | "Ceiling Light Pro"
            | "Plug Mini (US)"
            | "Plug Mini (JP)"
            | "Plug"
            | "Strip Light"
            | "Color Bulb"
            | "Robot Vacuum Cleaner S1"
            | "Robot Vacuum Cleaner S1 Plus"
            | "Humidifier"
            | "Indoor Cam"
            | "Pan/Tilt Cam",
        >
      • CommandBody

      Parameters

      • deviceId: string
      • deps: Deps

      Returns DeviceWithPowerToggleBrightnessColor<StatusBody, CommandBody>

    Properties

    _deps: Deps
    _deviceId: string

    Methods

    • Set color.

      Parameters

      • rgb: [number, number, number]

        An array of 3 numbers representing the RGB values.

        • rgb[0] is the red value (0-255).
        • rgb[1] is the green value (0-255).
        • rgb[2] is the blue value (0-255).

        E.g., [255, 0, 0] is red.

      Returns Promise<CommandBody>