TemperatureService
A list of all methods in the TemperatureService
service. Click on the method name to view detailed information about that method.
Methods | Description |
---|---|
get_temperatures | List all temperatures |
get_temperature | Get details of a single temperature sensor from its given {temperatureId} . |
update_temperature | Update a temperature sensor from its given {temperatureId} . |
get_temperatures
List all temperatures
- HTTP Method:
GET
- Endpoint:
/clip/v2/resource/temperature
Return Type
GetTemperaturesOkResponse
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.temperature.get_temperatures()
print(result)
get_temperature
Get details of a single temperature sensor from its given {temperatureId}
.
- HTTP Method:
GET
- Endpoint:
/clip/v2/resource/temperature/{temperatureId}
Parameters
Name | Type | Required | Description |
---|---|---|---|
temperature_id | str | ✅ | ID of the temperature sensor |
Return Type
GetTemperatureOkResponse
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.temperature.get_temperature(temperature_id="temperatureId")
print(result)
update_temperature
Update a temperature sensor from its given {temperatureId}
.
- HTTP Method:
PUT
- Endpoint:
/clip/v2/resource/temperature/{temperatureId}
Parameters
Name | Type | Required | Description |
---|---|---|---|
request_body | TemperaturePut | ❌ | The request body. |
temperature_id | str | ✅ | ID of the temperature sensor |
Return Type
UpdateTemperatureOkResponse
Example Usage Code Snippet
from open_hue import OpenHue, Environment
from open_hue.models import TemperaturePut
sdk = OpenHue(
api_key="YOUR_API_KEY",
api_key_header="YOUR_API_KEY_HEADER",
base_url=Environment.DEFAULT.value
)
request_body = TemperaturePut(
type_="temperature",
enabled=False
)
result = sdk.temperature.update_temperature(
request_body=request_body,
temperature_id="temperatureId"
)
print(result)
Build Your Own SDKs with liblab
Build developer friendly SDKs in minutes from your APIs