I try to change the temperature through the color_temp property, but the API returns Status: 400 [Bad request]. If I remove such attribute from the JSON, there is no problem in changing the brightness or color.
POST /api/services/light/turn_on HTTP/1.1
Host: 192.168.1.x:8123
Authorization: Bearer ey.......
Content-Type: application/json
Content-Length: 127
{
"entity_id": "light.192_168_1_73",
"rgb_color": [255,255,245],
"brightness": 255,
"color_temp":500
}
{
"entity_id": "light.192_168_1_73",
"state": "on",
"attributes": {
"min_mireds": 153,
"max_mireds": 588,
"effect_list": [
"Strobe color",
"Police",
"Christmas",
"RGB",
"Random Loop",
"Fast Random Loop",
"LSD",
"Slowdown",
"Night Mode",
"Date Night",
"Movie",
"Sunrise",
"Sunset",
"Romance",
"Happy Birthday",
"Disco",
"Strobe epilepsy!",
"Alarm",
"Police2",
"WhatsApp",
"Facebook",
"Twitter",
"Home",
"Candle Flicker",
"Slow Temp",
"Stop"
],
"supported_color_modes": [
"color_temp",
"hs",
"rgb"
],
"color_mode": "rgb",
"brightness": 255,
"hs_color": [
60.0,
3.922
],
"rgb_color": [
255,
255,
245
],
"xy_color": [
0.329,
0.339
],
"flowing": false,
"music_mode": false,
"friendly_name": "192.168.1.73",
"supported_features": 44
},
"last_changed": "2021-09-26T23:07:22.585078+00:00",
"last_updated": "2021-09-26T23:45:29.057099+00:00",
"context": {
"id": "243d...",
"parent_id": null,
"user_id": "7a43..."
}
}
Could you tell me how to use this property correctly?
Thanks