I've added a New Zealand purchased GOLDAIR PLATINUM TOWER FAN WITH WIFI (Model from Tuya API reported as GPTF380 / GPTF390) to my localtuya configuration, and mapped the DPs so all features work aside from the oscillation toggle. Oscillation can be disabled by toggling the oscillate switch in HA (either on or off will result in it being turned off), but it is not possible to enable oscillation.
I've collected debug logs, used the scanner tool to map out the DPs, and used the localtuya.set_dp service to confirm that the oscillation setting can be properly set from localtuya by sending the payloads of on and off accordingly.
The scanner correctly identifies the current value of the DP (DP 4 in this case) to be either on or off during device add. However, it seems the code is then sending boolean true or false to the service, perhaps due to this bit of code?
Environment
Localtuya version: 5.1.0
Home Assistant Core version: 2023.3.2
[] Does the device work using the Home Assistant Tuya Cloud component ?
The problem
I've added a New Zealand purchased GOLDAIR PLATINUM TOWER FAN WITH WIFI (Model from Tuya API reported as GPTF380 / GPTF390) to my localtuya configuration, and mapped the DPs so all features work aside from the oscillation toggle. Oscillation can be disabled by toggling the oscillate switch in HA (either on or off will result in it being turned off), but it is not possible to enable oscillation.
I've collected debug logs, used the scanner tool to map out the DPs, and used the
localtuya.set_dp
service to confirm that the oscillation setting can be properly set from localtuya by sending the payloads ofon
andoff
accordingly.The scanner correctly identifies the current value of the DP (DP 4 in this case) to be either
on
oroff
during device add. However, it seems the code is then sending booleantrue
orfalse
to the service, perhaps due to this bit of code?Environment
I have not used any of the above tools
Steps to reproduce
Example of how to properly set oscillation on, by calling the the
localtuya.set_dp
service:DP dump
Provide Home Assistant traceback/logs
Logs showing localtuya receiving the oscillate DP states (and properly decoding them):
Logs showing localtuya sending incorrect payloads for oscillate when I use the HA fan interface to change the setting:
Logs showing correct oscillate payload being sent (and the fan indeed changed the oscillation mode to on, working) via localtuya.set_dp service:
Additional information
Diagnostic dump for the device (what I believe to be the relevant part, if more is needed, just let me know):
Thanks!