device.type
:switch
- Models: Mi Smart Socket Plug 1 & 2, Aqara Plug, Aqara Light Control (Wall Switch)
- Model identifiers:
chuangmi.plug.v1
,chuangmi.plug.v2
,chuangmi.plug.m1
,lumi.plug
,lumi.ctrl_neutral1
,lumi.ctrl_neutral2
The switch type is used for anything that can control the power of one or more
things. Switches always have the capability power-channels
.
power
, array with the power state of all channelspowerChannelN
, where N is the channel (zero-indexed), boolean indicating if the channel is powered or not
The number of channels this device supports.
Get the powered on state of all channels as an array.
Get if the given channel is powered on.
Switch the power state of the given channel.
If the device can report how much power is being currently used.
loadVoltage
- the load voltage in mVloadPower
- the load power in W
If the device can report how much power has been used.
powerConsumed
- the power consumed in kWh