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
get_device_powersList all available device powers
get_device_powerGet power details of a single device from its given {deviceId}.

get_device_powers

List all available device powers

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

Return Type

GetDevicePowersOkResponse

Example Usage Code Snippet

from open_hue import OpenHue, Environment

sdk = OpenHue(
api_key="YOUR_API_KEY",
api_key_header="YOUR_API_KEY_HEADER",
base_url=Environment.DEFAULT.value
)

result = sdk.device_power.get_device_powers()

print(result)

get_device_power

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

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

Parameters

NameTypeRequiredDescription
device_idstrID of the device

Return Type

GetDevicePowerOkResponse

Example Usage Code Snippet

from open_hue import OpenHue, Environment

sdk = OpenHue(
api_key="YOUR_API_KEY",
api_key_header="YOUR_API_KEY_HEADER",
base_url=Environment.DEFAULT.value
)

result = sdk.device_power.get_device_power(device_id="deviceId")

print(result)

Build Your Own SDKs with  liblab

Build developer friendly SDKs in minutes from your APIs

Start for Free →