Skip to content

Latest commit

 

History

History
34 lines (20 loc) · 1.04 KB

power-outlet.md

File metadata and controls

34 lines (20 loc) · 1.04 KB

Power Outlet

  • device.type: power-outlet
  • Models: No outlets currently supported
  • Model identifiers: No outlets currently supported

Similar to the more generic type power-switch but represents an outlet mounted in or on a wall. Always has the capability power-channels and can support more than one channel.

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.