Zigbee light bulb color/temperature control not working from Apple Home app
See original GitHub issueDescribe the bug I am setting up my RGB Zigbee light bulb. I encountered two problems.
- Temperature selection is not “mapped” correctly. Selecting warm temperature in Apple Home turns lightbulb to cold temperature and vice-versa(cold temperature in Apple Home sets lightbulb to warm). Screenshots appended for this issue.
- Once “Temperature” is tinkered with on Apple Home app, light bulb switches to “White” mode and can’t be put back into “Colour” mode by changing colour in Home app. The only way I can set the lightbulb to “Colour” mode is via Tuya Smart app.
Expected behavior
- When I set temperature to warm I want my lightbulb to have warm temperature. If I set it to cold I want it to turn cold.
- After I change temperature and then colour from Apple Home app I want my lightbulb to switch to color mode without accessing Tuya Smart app.
Screenshots
Temperature:
In Apple’s home app
In Tuya Smart app

Color:
Change light temperature
Change color
Set light bulb to color inside Tuya Smart App

Device info (please complete the following information, which can be found in log): request path = /v1.0/iot-01/associated-users/devices
{
"active_time": 1628786261,
"biz_type": 0,
"category": "dj",
"create_time": 1628785271,
"icon": "smart/icon/ay1533895021982bN2sO/d85a0c9fd07d4fba736daa5bffb4618d.png",
"id": "bf2b7370276d41d135l90k",
"ip": "",
"lat": "<censored>",
"local_key": "8ad87ce8f487424e",
"lon": "<censored>",
"model": "R9077",
"name": "Smart Light bulb",
"node_id": "842e14fffe0fcc2b",
"online": true,
"owner_id": "34087278",
"product_id": "keabpigv",
"product_name": "R9077 E27 RGB CCT Zigbee Bulb",
"status": [
{
"code": "switch_led",
"value": true
},
{
"code": "work_mode",
"value": "white"
},
{
"code": "bright_value_v2",
"value": 408
},
{
"code": "temp_value_v2",
"value": 0
},
{
"code": "colour_data_v2",
"value": "{\"h\":16,\"s\":1000,\"v\":408}"
},
{
"code": "scene_data_v2",
"value": "{\"scene_num\":6,\"scene_units\":[{\"bright\":0,\"h\":0,\"s\":1000,\"temperature\":0,\"unit_change_mode\":\"jump\",\"unit_gradient_duration\":70,\"unit_switch_duration\":70,\"v\":1000},{\"bright\":0,\"h\":120,\"s\":1000,\"temperature\":0,\"unit_change_mode\":\"jump\",\"unit_gradient_duration\":70,\"unit_switch_duration\":70,\"v\":1000},{\"bright\":0,\"h\":240,\"s\":1000,\"temperature\":0,\"unit_change_mode\":\"jump\",\"unit_gradient_duration\":70,\"unit_switch_duration\":70,\"v\":1000},{\"bright\":0,\"h\":61,\"s\":1000,\"temperature\":0,\"unit_change_mode\":\"jump\",\"unit_gradient_duration\":70,\"unit_switch_duration\":70,\"v\":1000},{\"bright\":0,\"h\":174,\"s\":1000,\"temperature\":0,\"unit_change_mode\":\"jump\",\"unit_gradient_duration\":70,\"unit_switch_duration\":70,\"v\":1000},{\"bright\":0,\"h\":275,\"s\":1000,\"temperature\":0,\"unit_change_mode\":\"jump\",\"unit_gradient_duration\":70,\"unit_switch_duration\":70,\"v\":1000}]}"
},
{
"code": "countdown_1",
"value": 0
},
{
"code": "control_data",
"value": ""
}
Device functions (please complete the following information, which can be found in log): request path = /v1.0/devices/functions
{
"category": "dj",
"devices": [
"bf2b7370276d41d135l90k"
],
"functions": [
{
"code": "switch_led",
"desc": "switch led",
"name": "switch led",
"type": "Boolean",
"values": "{}"
},
{
"code": "work_mode",
"desc": "work mode",
"name": "work mode",
"type": "Enum",
"values": "{\"range\":[\"white\",\"colour\",\"scene\",\"music\"]}"
},
{
"code": "bright_value_v2",
"desc": "bright value v2",
"name": "bright value v2",
"type": "Integer",
"values": "{\"min\":10,\"scale\":0,\"unit\":\"\",\"max\":1000,\"step\":1}"
},
{
"code": "temp_value_v2",
"desc": "temp value v2",
"name": "temp value v2",
"type": "Integer",
"values": "{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":1000,\"step\":1}"
},
{
"code": "colour_data_v2",
"desc": "colour data v2",
"name": "colour data v2",
"type": "Json",
"values": "{\"h\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":360,\"step\":1},\"s\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":1000,\"step\":1},\"v\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":1000,\"step\":1}}"
},
{
"code": "scene_data_v2",
"desc": "scene data v2",
"name": "scene data v2",
"type": "Json",
"values": "{\"scene_num\":{\"min\":1,\"scale\":0,\"max\":8,\"step\":1},\"scene_units\": {\"unit_change_mode\":{\"range\":[\"static\",\"jump\",\"gradient\"]},\"unit_switch_duration\":{\"min\":0,\"scale\":0,\"max\":100,\"step\":1},\"unit_gradient_duration\":{\"min\":0,\"scale\":0,\"max\":100,\"step\":1},\"bright\":{\"min\":0,\"scale\":0,\"max\":1000,\"step\":1},\"temperature\":{\"min\":0,\"scale\":0,\"max\":1000,\"step\":1},\"h\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":360,\"step\":1},\"s\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":1000,\"step\":1},\"v\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":1000,\"step\":1}}}"
},
{
"code": "control_data",
"desc": "control data",
"name": "control data",
"type": "Json",
"values": "{\"change_mode\":{\"range\":[\"direct\",\"gradient\"]}, \"bright\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":1000,\"step\":1}, \"temperature\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":1000,\"step\":1}, \"h\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":360,\"step\":1},\"s\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1},\"v\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}}"
},
{
"code": "countdown_1",
"desc": "countdown 1",
"name": "countdown 1",
"type": "Integer",
"values": "{\"unit\":\"\",\"min\":0,\"max\": 43200,\"scale\":0,\"step\":1}"
}
],
"product_id": "keabpigv"
}
Additional context Add any other context or logs about the problem here.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:12 (2 by maintainers)
Top Results From Across the Web
Control accessories with Home on iPhone - Apple Support
Use the Home app and Control Center to control accessories in your home. ... Note: Adaptive Lighting requires a home hub—a device such...
Read more >Controlling the Color Temperature of your Smart LED ...
To control the color temperature of the Sengled Smart LED Tunable White A19 ... A19 bulbs were assigned to the “Kitchen” room in...
Read more >I Just Want to Control the Lights With My Voice. Is That So ...
Being able to control your lighting from anywhere in your home really ... bulbs not only let you adjust brightness and color temperature, ......
Read more >Apple HomeKit: Everything you need to know - TechHive
In a nutshell, Home works a lot like any other smart home control app, except that it is not tied to a specific...
Read more >Best Smart LED Light Bulbs - The New York Times
Setup happens via a smartphone app, but you can also control most smart bulbs using Amazon Alexa, Apple HomeKit, or Google Assistant.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Colour temperature not being mapped properly is also happening for my Wi-Fi light bulb with only colour temperature control
This is happening for me too. Colour temp seems to be inverted: cool white shows as warm and warm white shows as cool on Apple Homekit control? Please help!