-
-
Notifications
You must be signed in to change notification settings - Fork 35k
Fix for (some) tuya covers #59790
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
Fix for (some) tuya covers #59790
Conversation
convert strs params into ints
Fix for (some) tuya covers
Hello @imhotep, When attempting to inspect the commits of your pull request for CLA signature status among all authors we encountered commit(s) which were not linked to a GitHub account, thus not allowing us to determine their status(es). The commits that are missing a linked GitHub account are the following:
Unfortunately, we are unable to accept this pull request until this situation is corrected. Here are your options:
We apologize for this inconvenience, especially since it usually bites new contributors to Home Assistant. We hope you understand the need for us to protect ourselves and the great community we all have built legally. The best thing to come out of this is that you only need to fix this once and it benefits the entire Home Assistant and GitHub community. Thanks, I look forward to checking this PR again soon! ❤️ |
Hey there @tuya, @zlinoliver, @METISU, @frenck, mind taking a look at this pull request as it has been labeled with an integration ( |
This would violate specifications of the API. Have you contacted Tuya about this? As that sounds like an API issue.
We cannot simply flip that around. This is device depended. What devices will now break? |
I have not contacted Tuya as I don't know how to reach them. If you can provide me with some contact info I'd be more than happy to do that.
I agree. Ideally, we'd fetch the |
You can contact support when you log into the developer portal. Please note, that there are unsupported/devices out there that are not conform specifications. As there are many, we are not planning to add workarounds for them.
We can't make that user configurable. We don't have a construct for that in Home Assistant at this point. |
Hi @frenck , in the tuya custom_integration ( TuyaV2 before migration ), me and some friends wrote custom code for devices that weren't specified in tuya's documentation, it's natural because they work with white label devices, do you think it's possible to develop some feature so that Home Assistant accepts custom settings? As there are so many tuya devices, I believe it would be a good alternative, but I don't know if it is possible |
That question is to generic to be able to answer. Home Assistant doesn't have a construct for device level options (only integration level options). Custom integrations often violate design principles, but I cannot judge from your story if that is the case or not, as there is no concrete implementation suggestion in it. That said, that might be out of scope for this PR as well. |
@frenck I got in touch with Tuya support and they fixed the API. Their iot dashboard was also crashing because of this bug so it wasn't just specific to Home Assistant. The integers come back nicely now. |
Awesome! Thank is amazing progress! Thank you! 🙏
Yes, because it is device (or device category) dependent. So we can't just swap it for all. |
I get that but this setting doesn't work for some users like me that don't have their motors set to Reverse. What is the solution for us? This is not even documented and most users might just think that the integration is broken. |
There is none. You could use a template entity to wrap its behavior. We won't be able to support every single device that uses a Tuya chip (as not all manufacturers that use these chips are following the spec). |
Alright. I will keep using a custom component for now. Closing this one. |
Proposed change
The tuya API for some covers is currently breaking as some parameters come back a strings and the code expects integers. This PR attempts to convert the expected integer params from strings.
This PR also sets
Reverse
param toFalse
which is set toTrue
by default.Type of change
Additional information
Checklist
black --fast homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.The integration reached or maintains the following Integration Quality Scale:
To help with the load of incoming pull requests: