Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tuya_light: getting color temperature from another MCU makes the device uncontrollable #4669

Closed
kswt opened this issue Jul 6, 2023 · 0 comments · Fixed by esphome/esphome#5067

Comments

@kswt
Copy link

kswt commented Jul 6, 2023

The problem

If color_temperature_invert is set to true, when user sets color temperature using the IR remote, the ceiling light get stuck in a certain state:

  • the device does not respond to IR remote
  • log is flooded by endlessly repeating messages (see Logs section)

The only way to leave this state is switch off the light via REST API double times, because the first request to switch it off does not work.

Without the option color_temperature_invert the ceiling light works without any issues

Which version of ESPHome has the issue?

2023.6.3

What type of installation are you using?

pip

Which version of Home Assistant has the issue?

No response

What platform are you using?

ESP8266

Board

nodemcuv2

Component causing the issue

tuya_light

Example YAML snippet

esp8266:
  board: nodemcuv2

logger:
  baud_rate: 0

uart:
  rx_pin: GPIO3
  tx_pin: GPIO1
  baud_rate: 115200

# Register the Tuya MCU connection
tuya:

light:
  - platform: "tuya"
    name: "Remez Leda"
    switch_datapoint: 20
    dimmer_datapoint: 22
    max_value: 1000
    color_temperature_datapoint: 23
    color_temperature_max_value: 1000
    cold_white_color_temperature: 154 mireds
    warm_white_color_temperature: 333 mireds
    color_temperature_invert: true

Anything in the logs that might be useful for us?

Endlessly repeating:
[14:10:03][V][tuya:127]: Received Tuya: CMD=0x07 VERSION=3 DATA=[17.02.00.04.00.00.00.14 (8)] INIT_STATE=5

########################## Attention to this message ###########################
[14:10:03][D][tuya:312]: Datapoint 23 update to 20  
################################################################################

[14:10:03][D][light:036]: 'Remez Leda' Setting:                                 
[14:10:03][D][light:066]:   Color temperature: 329.4 mireds                     
[14:10:03][VV][api.service:122]: send_light_state_response: LightStateResponse {
  key: 3248337769                                                               
  state: YES                                                                    
  brightness: 1                                                                 
  color_mode: COLOR_MODE_COLOR_TEMPERATURE                                      
  color_brightness: 1                                                           
  red: 1                                                                        
  green: 1                                                                      
  blue: 1                                                                       
  white: 1                                                                      
  color_temperature: 329.42                                                     
  cold_white: 1                                                                 
  warm_white: 1                                                                 
  effect: ''                                                                    
}                                                                               
[14:10:03][V][tuya:407]: Sending Tuya: CMD=0x06 VERSION=0 DATA=[17.02.00.04.00.00.00.15 (8)] INIT_STATE=5

########################## Attention to this message ###########################
[14:10:03][D][tuya:593]: Setting datapoint 23 to 21 
################################################################################

[14:10:03][D][tuya:593]: Setting datapoint 22 to 1000                           
[14:10:03][V][tuya:601]: Not sending unchanged value                            
[14:10:03][D][tuya:593]: Setting datapoint 20 to 1                              
[14:10:03][V][tuya:601]: Not sending unchanged value                            
[14:10:03][V][tuya:127]: Received Tuya: CMD=0x07 VERSION=3 DATA=[17.02.00.04.00.00.00.14 (8)] INIT_STATE=5
[14:10:03][D][tuya:312]: Datapoint 23 update to 20                              
[14:10:03][D][light:036]: 'Remez Leda' Setting:                                 
[14:10:03][D][light:066]:   Color temperature: 329.4 mireds

Additional information

No response

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant