tuya / tuya-home-assistant

Home Assistant integration for controlling Powered by Tuya (PBT) devices using Tuya Open API, maintained by the Home Assistant Community and Tuya Developer Team.
MIT License
858 stars 206 forks source link

PBT light and Adaptive Lighting integration #386

Open sambarlick opened 2 years ago

sambarlick commented 2 years ago

Describe the bug Colour temperature and RGB not being updated by Adaptive Lighting integration. Manual control in HA works as expected.

Expected behavior The light should have either it's Colour temperature or RGB values updated by the integration during the day.

Screenshots

Home Assistant Version -2021.8.8

Device info (please complete the following information, which can be found in log): like this: { "active_time": 1595563787, "biz_type": 18, "category": "dj", "create_time": 1589341330, "icon": "smart/program_category_icon/dj.png", "id": " ", "ip": " ", "lat": " ", "local_key": " ", "lon": " ", "model": "KASB10WRGBCCTE27A", "name": "Lounge Ceiling Light", "online": true, "owner_id": " ", "product_id": "dzxeqwa05pyufkwv", "product_name": "Smart RGB+CCT Bulb", "status": [ { "code": "switch_led", "value": false }, { "code": "work_mode", "value": "white" }, { "code": "bright_value_v2", "value": 1000 }, { "code": "temp_value_v2", "value": 288 }, { "code": "colour_data_v2", "value": "{\"h\":30,\"s\":949,\"v\":721}" }, { "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}]}" }, { "code": "countdown_1", "value": 0 }, { "code": "control_data", "value": "" } ], "sub": false, "time_zone": "+10:00", "uid": " ", "update_time": 1628991058, "uuid": " " }, "success": true, "t": 1629377265365 } **Device specifications

Request: curl --request GET "https://openapi.tuyaeu.com/v1.0/devices/006086302cf432240fd6" --header "sign_method: HMAC-SHA256" --header "client_id: jxrx8xq8aq0gnazhdg6n" --header "t: 1629377266099" --header "mode: cors" --header "Content-Type: application/json" --header "sign: C84EAAFE0898AF7C0DECC538B58EAC25700E5D0B873168CFABA1E7DAD0C5570C" --header "access_token: 6152981f5f94b67e5a558f9fab25cde4"

Additional context Add any other context or logs about the problem here.

philandmon commented 2 years ago

+1 on this as an issue for me currently preventing me from using these lights with the adaptive lighting interrogation. I believe it might be related to the lights not appearing to respond to multiple commands from the lights service, I've simulated this with node red and HA by using a manual trigger passing brightness and kelvin at the same time and they will only respond to one of them. There is some minor improvement with the adaptive lighting interrogation if you set the “separate_turn_on_commands: Separate the commands for each attribute (color, brightness, etc.) in 'light.turn_on' (required for some lights).” but my lighting group does not respond predictably, some don’t change or go to full brightness etc.