Skip to main content

LightLevelService

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

MethodsDescription
get_light_levelsList all available light levels.
get_light_levelGet details of a single light from its given {lightId}.
update_light_levelUpdate a single light from its given {lightId}.

get_light_levels

List all available light levels.

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

Return Type

GetLightLevelsOkResponse

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.light_level.get_light_levels()

print(result)

get_light_level

Get details of a single light from its given {lightId}.

  • HTTP Method: GET
  • Endpoint: /clip/v2/resource/light_level/{lightId}

Parameters

NameTypeRequiredDescription
light_idstrID of the light

Return Type

GetLightLevelOkResponse

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.light_level.get_light_level(light_id="lightId")

print(result)

update_light_level

Update a single light from its given {lightId}.

  • HTTP Method: PUT
  • Endpoint: /clip/v2/resource/light_level/{lightId}

Parameters

NameTypeRequiredDescription
request_bodyLightLevelPutThe request body.
light_idstrID of the light

Return Type

UpdateLightLevelOkResponse

Example Usage Code Snippet

from open_hue import OpenHue, Environment
from open_hue.models import LightLevelPut

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

request_body = LightLevelPut(
type_="type",
enabled=False
)

result = sdk.light_level.update_light_level(
request_body=request_body,
light_id="lightId"
)

print(result)

Build Your Own SDKs with  liblab

Build developer friendly SDKs in minutes from your APIs

Start for Free →