Well I take back what I said earlier about the work mode getting sent. Here is the log. It shows the work_mode being set to colour but coming back as white.
2022-01-02 14:50:37 DEBUG (SyncWorker_1) [homeassistant.components.tuya.base] Sending commands for device redacted: [{'code': <DPCode.SWITCH_LED: 'switch_led'>, 'value': True}, {'code': <DPCode.WORK_MODE: 'work_mode'>, 'value': <WorkMode.COLOUR: 'colour'>}, {'code': <DPCode.COLOUR_DATA_V2: 'colour_data_v2'>, 'value': '{"h": 330, "s": 1000, "v": 176}'}, {'code': <DPCode.BRIGHT_VALUE_V2: 'bright_value_v2'>, 'value': 185}]
2022-01-02 14:50:37 DEBUG (SyncWorker_5) [homeassistant.components.tuya.base] Sending commands for device redacted: [{'code': <DPCode.SWITCH_LED: 'switch_led'>, 'value': True}, {'code': <DPCode.WORK_MODE: 'work_mode'>, 'value': <WorkMode.COLOUR: 'colour'>}, {'code': <DPCode.COLOUR_DATA_V2: 'colour_data_v2'>, 'value': '{"h": 330, "s": 1000, "v": 176}'}, {'code': <DPCode.BRIGHT_VALUE_V2: 'bright_value_v2'>, 'value': 185}]
2022-01-02 14:50:37 DEBUG (SyncWorker_0) [homeassistant.components.tuya.base] Sending commands for device redacted: [{'code': <DPCode.SWITCH_LED: 'switch_led'>, 'value': True}, {'code': <DPCode.WORK_MODE: 'work_mode'>, 'value': <WorkMode.COLOUR: 'colour'>}, {'code': <DPCode.COLOUR_DATA_V2: 'colour_data_v2'>, 'value': '{"h": 330, "s": 1000, "v": 176}'}, {'code': <DPCode.BRIGHT_VALUE_V2: 'bright_value_v2'>, 'value': 185}]
2022-01-02 14:50:37 DEBUG (Thread-6) [homeassistant.components.tuya] Received update for device redacted: {'switch_led': True, 'work_mode': 'white', 'bright_value_v2': 185, 'temp_value_v2': 438, 'colour_data_v2': '{"h":330,"s":1000,"v":176}', 'scene_data_v2': '{"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_1': 0, 'music_data': '', 'control_data': '', 'sleep_mode': 'AAA=', 'wakeup_mode': 'AAA='}
2022-01-02 14:50:37 DEBUG (Thread-6) [homeassistant.components.tuya] Received update for device redacted: {'switch_led': True, 'work_mode': 'white', 'bright_value_v2': 185, 'temp_value_v2': 438, 'colour_data_v2': '{"h":330,"s":1000,"v":176}', 'scene_data_v2': '{"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_1': 0, 'music_data': '', 'control_data': '', 'sleep_mode': 'AAA=', 'wakeup_mode': 'AAA='}
2022-01-02 14:50:37 DEBUG (Thread-6) [homeassistant.components.tuya] Received update for device redacted: {'switch_led': True, 'work_mode': 'white', 'bright_value_v2': 185, 'temp_value_v2': 438, 'colour_data_v2': '{"h":330,"s":1000,"v":176}', 'scene_data_v2': '{"scene_num":8,"scene_units":[{"bright":0,"h":0,"s":1000,"temperature":0,"unit_change_mode":"gradient","unit_gradient_duration":70,"unit_switch_duration":70,"v":1000},{"bright":0,"h":120,"s":1000,"temperature":0,"unit_change_mode":"gradient","unit_gradient_duration":70,"unit_switch_duration":70,"v":1000},{"bright":0,"h":240,"s":1000,"temperature":0,"unit_change_mode":"gradient","unit_gradient_duration":70,"unit_switch_duration":70,"v":1000},{"bright":0,"h":61,"s":1000,"temperature":0,"unit_change_mode":"gradient","unit_gradient_duration":70,"unit_switch_duration":70,"v":1000},{"bright":0,"h":174,"s":1000,"temperature":0,"unit_change_mode":"gradient","unit_gradient_duration":70,"unit_switch_duration":70,"v":1000},{"bright":0,"h":275,"s":1000,"temperature":0,"unit_change_mode":"gradient","unit_gradient_duration":70,"unit_switch_duration":70,"v":1000}]}', 'countdown_1': 0, 'music_data': '', 'control_data': '', 'sleep_mode': 'AAA=', 'wakeup_mode': 'AAA='}
This is the only place I see in the code that the work mode gets set. I’m not a python coder but I have been coding for 25+ years. Guess it’s time to learn it.
Tuya / light.py