Dimmer

TP-Link models: HS220.

Hierarchy

  • Dimmer

Constructors

Properties

apiModuleName: string
device: Plug

Accessors

  • get brightness(): number
  • Cached value of sysinfo.brightness.

    Returns number

Methods

  • Get Plug/Dimmer default behavior configuration.

    Requests dimmer.get_default_behavior. Does not support childId.

    Parameters

    Returns Promise<unknown>

    parsed JSON response

  • Get Plug/Dimmer parameters configuration.

    Requests dimmer.get_dimmer_parameters. Does not support childId.

    Parameters

    Returns Promise<unknown>

    parsed JSON response

  • Sets Plug to the specified brightness.

    Sends dimmer.set_brightness command. Does not support childId.

    Parameters

    • brightness: number

      0-100

    • Optional sendOptions: SendOptions

    Returns Promise<unknown>

    parsed JSON response

  • Transitions Plug to the specified brightness.

    Sends dimmer.set_dimmer_transition command. Does not support childId.

    Parameters

    Returns Promise<unknown>

    parsed JSON response

  • Set Plug/Dimmer default_behavior configuration for double_click.

    Sends dimmer.set_double_click_action. Does not support childId.

    Parameters

    Returns Promise<unknown>

    parsed JSON response

  • Set Plug dimmer_parameters for fadeOffTime.

    Sends dimmer.set_fade_off_time. Does not support childId.

    Parameters

    • fadeTime: number

      duration in ms

    • Optional sendOptions: SendOptions

    Returns Promise<unknown>

    parsed JSON response

  • Set Plug dimmer_parameters for fadeOnTime.

    Sends dimmer.set_fade_on_time. Does not support childId.

    Parameters

    • fadeTime: number

      duration in ms

    • Optional sendOptions: SendOptions

    Returns Promise<unknown>

    parsed JSON response

  • Set Plug dimmer_parameters for gentleOffTime.

    Sends dimmer.set_gentle_off_time. Does not support childId.

    Parameters

    • duration: number

      duration in ms

    • Optional sendOptions: SendOptions

    Returns Promise<unknown>

    parsed JSON response

  • Set Plug dimmer_parameters for gentleOnTime.

    Sends dimmer.set_gentle_on_time. Does not support childId.

    Parameters

    • duration: number

      duration in ms

    • Optional sendOptions: SendOptions

    Returns Promise<unknown>

    parsed JSON response

  • Set Plug/Dimmer default_behavior configuration for long_press.

    Sends dimmer.set_long_press_action. Does not support childId.

    Parameters

    Returns Promise<unknown>

    parsed JSON response

  • Sets Plug to the specified on/off state.

    Sends dimmer.set_switch_state command. Does not support childId.

    Parameters

    • state: boolean | 0 | 1

      true=on, false=off

    • Optional sendOptions: SendOptions

    Returns Promise<unknown>

    parsed JSON response

Generated using TypeDoc