Skip to content

Latest commit

 

History

History
33 lines (19 loc) · 1018 Bytes

power-switch.md

File metadata and controls

33 lines (19 loc) · 1018 Bytes

Power Switch

  • device.type: power-switch
  • Models: Aqara Light Control (Wall Switch)
  • Model identifiers: lumi.ctrl_neutral1, lumi.ctrl_neutral2

The switch type is used for devices that can control the power of one or more things. Switches always have the capability power-channels.

Supports the capabilities power-load and power-usage.

Basic API

Properties

  • power, array with the power state of all channels
  • powerChannelNAME, where NAME is the channel with the first letter uppercase, boolean indicating if the channel is powered or not

device.powerChannels: Array[string]

The channels this device supports.

device.power(): Object

Get the powered on state of all channels as an object with keys for each channel.

device.power(channel): boolean

Get if the given channel is powered on.

device.setPower(channel, boolean): Promise

Switch the power state of the given channel.