Closed LiZhenhuan1019 closed 2 months ago
I really appreciate your effort and the explanation you made made it kinda clear to me. But this may only works for you and not for everyone, so I'm really not sure.
by the way have you made tests? You can change the value of "35" DP using set_dp service
See my solution to decode tuya datapoints rawdata:
https://github.com/rospogrigio/localtuya/issues/1193#issuecomment-1951057842
@andrus2049 I tested your method before here: https://github.com/xZetsubou/hass-localtuya/issues/156#issuecomment-1973975514 but it didn't ends up well for me.
This issue is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 5 days.
The problem
I tried in hass to call the light in localtuya with transition parameter, but it seems not having any effect. I found that I was able to configure the transition time in tuya app. So, I investigated it and here was what I found:
DP 35, switch_gradient![image](https://github.com/xZetsubou/hass-localtuya/assets/13597393/fa165e05-fb3c-41ba-b996-db695af6c968)
The value is a base64 encoding of 7 bytes data. The first 1 byte is always 0x00. The 2-4th bytes are transition time in milliseconds used when turning on the light, and the 5-7 bytes are used when turning off. For example, if I set both the transition time to 60s in tuya app, the value of this dp will
AADqYADqYA==
, and the decoded data will be0x00 00ea60 00ea60
.0x00ea60
is60000
in decimal. For another example, if I set the on-transition time to 10.1s, and the off-transition time to 2.5s, then the value will beAAAndAAJxA==
and the decoded data will be0x00 002774 0009c4
.0x2774
is10100
in decimal and0x9c4
is2500
in decimal.I hope that this can be used to support transition configuration.