Open SmartMarsh opened 3 years ago
This seems like a similar issue to #308 and #131 (and others). The bulbs I am using with these issues doesn't have a white temperature (change from cool to warm white), but it looks like the same issue is switching from color back to a white setting.
Describe the bug I have a issue in light card of the UI. I have added two tuya lamps (CCT Only lamp and CCT+RGB lamp) home assistant through Tuya V2. For CCT only lamp light card is ok. But for CCT+RGB lamp light card has a issue. Because the bulb icon's color show as RGB color when I set the bulbs color as CCT color (temperature). So I would like to know how to overcome this issue
Expected behavior When setting a CCT (Temperature) color to the bulb, the bulb's icon on the UI should set to the CCT color (Temperature).
Screenshots
Home Assistant Version
Device info { "active_time": 1628151445, "biz_type": 18, "category": "dj", "create_time": 1626399000, "icon": "smart/icon/ay15431996119293jn9C/d35f31337e6d7612b4ea242ae6616c04.png", "id": "268383008caab5e7e5f1", "ip": "123.231.124.167", "lat": "6.8141123", "local_key": "de67c616fccf6ab2", "lon": "79.9276186", "name": "Living Room Lamp", "online": true, "owner_id": "35084940", "product_id": "nvhap6pex3xunndn", "product_name": "ORELHOME A60 Bulb 9W CCT+RGB - WiFi", "status": [ { "code": "switch_led", "value": true }, { "code": "work_mode", "value": "white" }, { "code": "bright_value_v2", "value": 813 }, { "code": "temp_value_v2", "value": 97 }, { "code": "colour_data_v2", "value": "{\"h\":120,\"s\":1000,\"v\":400}" }, { "code": "scene_data_v2", "value": "{\"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}]}" }, { "code": "countdown_1", "value": 0 }, { "code": "control_data", "value": "" } ], "sub": false, "time_zone": "+05:30", "uid": "eu1627986604481m70r8", "update_time": 1628231972, "uuid": "268383008caab5e7e5f1" },
Device specifications
2021-08-06 13:58:28 DEBUG (SyncWorker_5) [tuya iot] Response: { "result": { "category": "dj", "functions": [ { "code": "switch_led", "type": "Boolean", "values": "{}" }, { "code": "work_mode", "type": "Enum", "values": "{\"range\":[\"white\",\"colour\",\"scene\",\"music\"]}" }, { "code": "bright_value_v2", "type": "Integer", "values": "{\"min\":10,\"max\":1000,\"scale\":0,\"step\":1}" }, { "code": "temp_value_v2", "type": "Integer", "values": "{\"min\":0,\"max\":1000,\"scale\":0,\"step\":1}" }, { "code": "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", "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": "countdown_1", "type": "Integer", "values": "{\"min\":0,\"max\":86400,\"scale\":0,\"step\":1}" }, { "code": "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}}" } ], "status": [ { "code": "switch_led", "type": "Boolean", "values": "{}" }, { "code": "work_mode", "type": "Enum", "values": "{\"range\":[\"white\",\"colour\",\"scene\",\"music\"]}" }, { "code": "bright_value_v2", "type": "Integer", "values": "{\"min\":10,\"max\":1000,\"scale\":0,\"step\":1}" }, { "code": "temp_value_v2", "type": "Integer", "values": "{\"min\":0,\"max\":1000,\"scale\":0,\"step\":1}" }, { "code": "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", "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": "countdown_1", "type": "Integer", "values": "{\"min\":0,\"max\":86400,\"scale\":0,\"step\":1}" }, { "code": "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}}" } ] }, "success": true, "t": 1628238507982 }
Additional context Add any other context or logs about the problem here.