All files / src/models enums.ts

100% Statements 67/67
100% Branches 14/14
100% Functions 7/7
100% Lines 67/67

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 921x 1x 1x   1x 1x 1x 1x     1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x         1x   1x   1x   1x         1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x           1x   1x 1x 1x 1x 1x         1x 1x 1x 1x  
export enum DeviceStatus {
    ON = "on",
    OFF = "off",
}
export enum ColorMode {
    WHITE = 1,
    COLOR = 2,
    FLOW = 3,
}
/** */
export enum CommandType {
    SET_POWER = "set_power",
    TOGGLE = "toggle",
    SET_DEFAULT = "set_default",
    START_COLOR_FLOW = "start_cf",
    STOP_COLOR_FLOW = "stop_cf",
    GET_PROPS = "get_prop",
    SET_SCENE = "set_scene",
    SET_CT_ABX = "set_ct_abx",
    SET_RGB = "set_rgb",
    SET_HSV = "set_hsv",
    SET_BRIGHT = "set_bright",
    CRON_ADD = "cron_add",
    CRON_GET = "cron_get",
    CRON_DEL = "cron_del",
    SET_ADJUST = "set_adjust",
    SET_MUSIC = "set_music",
    SET_NAME = "set_name",
    ADJUST_BRIGHT = "adjust_bright",
    ADJUST_CT = "adjust_ct",
    ADJUST_COLOR = "adjust_color",
    PING = "ping", // Note: Ping is not a valid command, but used to check connection
}
/**
 * the action taken after the flow is stopped.
 */
export enum StartFlowAction {
    /** smart LED recover to the state before the color flow started. */
    LED_RECOVER = 0,
    /** 1 means smart LED stay at the state when the flow is stopped */
    LED_STAY = 1,
    /** turn off the smart LED after the flow is stopped. */
    LED_OFF = 2,
}
/**
 * The supported properties
 */
export enum DevicePropery {
    POWER = "power",
    BRIGHT = "bright",
    CT = "ct",
    RGB = "rgb",
    HUE = "hue",
    SAT = "sat",
    COLOR_MODE = "color_mode",
    FLOWING = "flowing",
    DELAYOFF = "delayoff",
    FLOW_PARAMS = "flow_params",
    MUSIC_ON = "music_on",
    NAME = "name",
    BG_POWER = "bg_power",
    BG_FLOWING = "bg_flowing",
    BG_FLOW_PARAMS = "bg_flow_params",
    BG_CT = "bg_ct",
    BG_LMODE = "bg_lmode",
    BG_BRIGHT = "bg_bright",
    BG_HUE = "bg_hue",
    BG_SAT = "bg_sat",
    BG_RGB = "bg_rgb",
    NL_BR = "nl_br",
    ACTIVE_MODE = "active_mode",
}
 
/**
 * Scene type
 */
export enum SceneType {
    /** change the smart LED to specified color and brightness. */
    COLOR = "color",
    HSV = "hsv",
    CT = "ct",
    CF = "cf",
    AUTO_DELAY_OFF = "auto_delay_off",
}
/**
 * Adjust type
 */
export enum AdjustType {
    INCREASE = "increase",
    DECREASE = "decrease",
    CIRCLE = "circle",
}