-
Notifications
You must be signed in to change notification settings - Fork 530
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
Fan Speed Control, device expect integer but fan integration send string instead for fan control #1036
Comments
Good news! After coming across your issue and trying the suggested fix, I discovered they fixed it in 4.1.1! After updating to 4.1.1, I edited the fan (LocalTuya > Configure > Edit a device), and when it comes to the page where you configure the DPs, right at the bottom is a new option "int or str". If your fan was having issues previously, just set it to "int" and it should work now. I guess some fans required a string value rather than integer, and we just happened to have fans that used the other. Now with this new setting, it satisfies all types of Tuya fans! |
Yeah? I'm on 4.1.1 too, and HA latest Nov release in a Docker container, but I can't see that unfortunately. Anything else you might have done to get this option maybe? |
I realise now, this has actually gone backwards for me. I had employed the workaround mods to fan.py but have updated to 4.1.1 and this is now not working. Looking at fan.py now, I can see it implies a configuration option as described above for CONF_FAN_DPS_TYPE, but this is missing in the HA integration UI for me and so the code assumes I've reversed the logic as a workaround that suits my situation: Changed...
To...
|
@rossco555 it's possible that the UI only shows up when you add a new device as I did that a few times while troubleshooting this. Have you tried deleting the device and adding it again via localtuya? |
Thanks for the suggestion. I'll give that a try but may not get to it immediately. Will revert. |
@jedimdan I gave that a try just now but failed trying to remove a device: Settings > Integrations > localTuya Configure > Edit a Device > unchecked the entity name at bottom and clicked Submit, but I get:
|
@rossco555 You have to delete the device from HA, not localtuya. Open the device in HA, click on the 3 dots in the Device info card, and click on "Delete". |
How did you take the dump of the DP settings? Cant figure out what DP is for what. Help appreciated. |
I used the iot.tuya.com via API Explorer to dump the DPs at least back then but for some odd reason they removed it so, the only possible way to dump this is via tinytuya. it list all the possible DP ID numbers, its all up to you to find out which one DP correspond to but usually you can get each DP number funtions via API explorer on iot tuya website, look for the "Get Device Specification" under "General Device Management", each function corresponds to the DPs you have dumped using tinytuya all in sequntial, the first DP correspond to the first function, 2nd... 3rd... until you get to the last DP. |
The problem
Environment
Steps to reproduce
Configuration
configuration.yaml
orconfig_flow
DP dump
Provide Home Assistant taceback/logs
Additional information
workaround:
https://community.home-assistant.io/t/local-tuya-fan-controller/306985/45
basically edit the fan.py and remove the string function. save changes and restart HA, now everything works.
The text was updated successfully, but these errors were encountered: