Skip to main content

DevicePowerService

A list of all methods in the DevicePowerService service. Click on the method name to view detailed information about that method.

MethodsDescription
getDevicePowersList all available device powers
getDevicePowerGet power details of a single device from its given {deviceId}.

getDevicePowers

List all available device powers

  • HTTP Method: GET
  • Endpoint: /clip/v2/resource/device_power

Return Type

GetDevicePowersOkResponse

Example Usage Code Snippet

import { OpenHue } from 'open-hue';

(async () => {
const openHue = new OpenHue({
apiKey: 'YOUR_API_KEY',
});

const { data } = await openHue.devicePower.getDevicePowers();

console.log(data);
})();

getDevicePower

Get power details of a single device from its given {deviceId}.

  • HTTP Method: GET
  • Endpoint: /clip/v2/resource/device_power/{deviceId}

Parameters

NameTypeRequiredDescription
deviceIdstringID of the device

Return Type

GetDevicePowerOkResponse

Example Usage Code Snippet

import { OpenHue } from 'open-hue';

(async () => {
const openHue = new OpenHue({
apiKey: 'YOUR_API_KEY',
});

const { data } = await openHue.devicePower.getDevicePower('deviceId');

console.log(data);
})();

Build Your Own SDKs with  liblab

Build developer friendly SDKs in minutes from your APIs

Start for Free →