LightLevelService
A list of all methods in the LightLevelService
service. Click on the method name to view detailed information about that method.
Methods | Description |
---|---|
get_light_levels | List all available light levels. |
get_light_level | Get details of a single light from its given {lightId} . |
update_light_level | Update 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
Name | Type | Required | Description |
---|---|---|---|
light_id | str | ✅ | ID 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
Name | Type | Required | Description |
---|---|---|---|
request_body | LightLevelPut | ❌ | The request body. |
light_id | str | ✅ | ID 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