Add support for Dim- Light-CCT to Tuya Integration
The problem
Dim- Light-CCT shows up as unsupported
What version of Home Assistant Core has the issue?
core-2024.10.1
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
tuya
Link to integration documentation on our website
https://www.home-assistant.io/integrations/tuya
Diagnostics information
tuya-01J2TZX9CB28M214R9A30YHTKB-Aussenleuchte 9a-bee94d2122d72af3ee5c0edef9fa86e8.json
Example YAML snippet
No response
Anything in the logs that might be useful for us?
},
"integration_manifest": {
"domain": "tuya",
"name": "Tuya",
"codeowners": [
"Tuya",
"zlinoliver",
"frenck"
],
"config_flow": true,
"dependencies": [
"ffmpeg"
],
"dhcp": [
{
"macaddress": "105A17*"
},
{
"macaddress": "10D561*"
},
{
"macaddress": "1869D8*"
},
{
"macaddress": "381F8D*"
},
{
"macaddress": "508A06*"
},
{
"macaddress": "68572D*"
},
{
"macaddress": "708976*"
},
{
"macaddress": "7CF666*"
},
{
"macaddress": "84E342*"
},
{
"macaddress": "D4A651*"
},
{
"macaddress": "D81F12*"
}
],
"documentation": "https://www.home-assistant.io/integrations/tuya",
"integration_type": "hub",
"iot_class": "cloud_push",
"loggers": [
"tuya_iot"
],
"requirements": [
"tuya-device-sharing-sdk==0.1.9"
],
"is_built_in": true
},
"setup_times": {
"null": {
"setup": 6.840098649263382e-05
},
"01J2TZX9CB28M214R9A30YHTKB": {
"wait_import_platforms": -8.668071286287159,
"wait_base_component": -0.03740110481157899,
"config_entry_setup": 9.565174310002476
}
},
"data": {
"endpoint": "https://apigw.tuyaeu.com",
"terminal_id": "1721040282821OBQLnX",
"mqtt_connected": true,
"disabled_by": null,
"disabled_polling": false,
"id": "bfc9edc0f96d3a3473yjmb",
"name": "Aussenleuchte 9a",
"category": "tyd",
"product_id": "t9cac8gmr17wgact",
"product_name": "Dim- Light-CCT",
"online": false,
"sub": false,
"time_zone": "+02:00",
"active_time": "2024-10-05T10:14:33+00:00",
"create_time": "2024-10-05T10:14:33+00:00",
"update_time": "2024-10-05T10:14:33+00:00",
"function": {
"switch_led": {
"type": "Boolean",
"value": {}
},
"work_mode": {
"type": "Enum",
"value": {
"range": [
"white",
"colour",
"scene",
"music"
]
}
},
"bright_value": {
"type": "Integer",
"value": {
"min": 10,
"max": 1000,
"scale": 0,
"step": 1
}
},
"temp_value": {
"type": "Integer",
"value": {
"min": 0,
"max": 1000,
"scale": 0,
"step": 1
}
},
"scene_data": {
"type": "Json",
"value": {}
},
"countdown": {
"type": "Integer",
"value": {
"unit": "s",
"min": 0,
"max": 86400,
"scale": 0,
"step": 1
}
},
"control_data": {
"type": "Json",
"value": {}
},
"rhythm_mode": {
"type": "Raw",
"value": {}
},
"wakeup_mode": {
"type": "Raw",
"value": {}
},
"power_memory": {
"type": "Raw",
"value": {}
},
"do_not_disturb": {
"type": "Boolean",
"value": {}
},
"cycle_timing": {
"type": "Raw",
"value": {}
},
"random_timing": {
"type": "Raw",
"value": {}
}
},
"status_range": {
"switch_led": {
"type": "Boolean",
"value": {}
},
"work_mode": {
"type": "Enum",
"value": {
"range": [
"white",
"colour",
"scene",
"music"
]
}
},
"bright_value": {
"type": "Integer",
"value": {
"min": 10,
"max": 1000,
"scale": 0,
"step": 1
}
},
"temp_value": {
"type": "Integer",
"value": {
"min": 0,
"max": 1000,
"scale": 0,
"step": 1
}
},
"scene_data": {
"type": "Json",
"value": {}
},
"countdown": {
"type": "Integer",
"value": {
"unit": "s",
"min": 0,
"max": 86400,
"scale": 0,
"step": 1
}
},
"rhythm_mode": {
"type": "Raw",
"value": {}
},
"wakeup_mode": {
"type": "Raw",
"value": {}
},
"power_memory": {
"type": "Raw",
"value": {}
},
"do_not_disturb": {
"type": "Boolean",
"value": {}
},
"cycle_timing": {
"type": "Raw",
"value": {}
},
"random_timing": {
"type": "Raw",
"value": {}
}
},
"status": {
"switch_led": true,
"work_mode": "white",
"bright_value": 1000,
"temp_value": 0,
"scene_data": {
"scene_num": 1,
"scene_units": [
{
"bright": 200,
"h": 0,
"s": 0,
"temperature": 0,
"unit_change_mode": "static",
"unit_gradient_duration": 13,
"unit_switch_duration": 14,
"v": 0
}
]
},
"countdown": 0,
"rhythm_mode": "AAAAAAA=",
"wakeup_mode": "AAA=",
"power_memory": "AAEAAAAAAAAD6AAA",
"do_not_disturb": false,
"cycle_timing": "AAAA",
"random_timing": "AAAA"
},
"home_assistant": {
"name": "Aussenleuchte 9a",
"name_by_user": null,
"disabled": false,
"disabled_by": null,
"entities": []
},
"set_up": false,
"support_local": true
}
}
Additional information
No response
Hey there @tuya, @zlinoliver, @frenck, mind taking a look at this issue as it has been labeled with an integration (tuya) you are listed as a code owner for? Thanks!
Code owner commands
Code owners of tuya can trigger bot actions by commenting:
@home-assistant closeCloses the issue.@home-assistant rename Awesome new titleRenames the issue.@home-assistant reopenReopen the issue.@home-assistant unassign tuyaRemoves the current integration label and assignees on the issue, add the integration domain after the command.@home-assistant add-label needs-more-informationAdd a label (needs-more-information, problem in dependency, problem in custom component) to the issue.@home-assistant remove-label needs-more-informationRemove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.
(message by CodeOwnersMention)
tuya documentation tuya source (message by IssueLinks)
Is CCT mode available through the Tuya integration? I cannot get it to work.
Is CCT mode available through the Tuya integration? I cannot get it to work.
Not yet. That is what this issue is about.
@N3m3515 there is this PR open about it.
Tuya should already support CCT afaik. The issue mentioned (and PR I opened) won't necessarily fix your problem. You should try testing it out with the provided code fix (in the PR) and your specific bulbs. The issue is about bulbs that don't support color temperature, but just a white mode.
Your bulb is likely not supported because the field "category" with value "tyd" is not in the list of available lights.
If you check light.py in the tuya component, you will see a pre-defined constant called LIGHTS which defines all the light categories and their TuyaLightEntityDescription. tyd is not in the list and needs to be added. Normal lights, like the one in the mentioned issue, are category dj.
Tuya should already support CCT afaik. The issue mentioned (and PR I opened) won't necessarily fix your problem. You should try testing it out with the provided code fix (in the PR) and your specific bulbs. The issue is about bulbs that don't support color temperature, but just a white mode.
Your bulb is likely not supported because the field
"category"with value"tyd"is not in the list of available lights.If you check light.py in the tuya component, you will see a pre-defined constant called
LIGHTSwhich defines all the light categories and theirTuyaLightEntityDescription.tydis not in the list and needs to be added. Normal lights, like the one in the mentioned issue, are categorydj.
should be a quick thing to add. Can i test it in my Installation? do you know where to find the light.py file in HAOS?
should be a quick thing to add. Can i test it in my Installation? do you know where to find the light.py file in HAOS?
You will need to clone/download the HA Core repo and install it as a custom integration as described in following comments. See the bottom of my comment And this comment
Hello, Installed & tested : works well with LSC SMART MOOD LIGHT 👌 thx a lot 🙏
Did the "tyd" category get added to the repo?
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
Please stop closing issues hat are not resolved
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
this is ridiculous
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.