Closed emilinsweden closed 2 years ago
tuya documentation tuya source (message by IssueLinks)
Hey there @tuya, @zlinoliver, @metisu, @frenck, mind taking a look at this issue as it has been labeled with an integration (tuya
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
Honestly, I think this will be one of the unfixable problems that will keep appearing. If we flip it again, it will be wrong for a lot of other people. There won't be a right solution here.
I'm really out of ideas on resolving this.
I'm really out of ideas on resolving this.
Is it possible to expose an option on the device to flip the directionality? A manual flick of a switch seems like a better solution than nothing.
Home Assistant doesn't have a construct for configuring device preferences. It only has a construct for configuring integrations or device options that the device itself provides.
Since this is not a global integration setting, and not a control the device itself provides, there isn't a place for it.
Since this is [...] not a control the device itself provides, there isn't a place for it.
Is there any reason this is a hard limitation? Creating an entity for the device to control reversing the direction doesn't seem that dissimilar to an option provided by the device itself. This is what I was thinking of when I made my comment.
Is there any reason this is a hard limitation?
It not a hard limitation, it simply doesn't exist at this point. So this it not a matter of just a Tuya change, this needs a fundamental change to Home Assistant.
Same issue with the Tuya Garage door opener. When the door is closed it shows open and open it shows closed. In the Tuya app it shows correctly.
Version core-2021.11.5 Version supervisor-2021.10.8
@taljaardwp Please avoid raising "Same issue" report. Instead, use the 👍 on the issue openings description. Thanks 👍
Is there any reason this is a hard limitation?
It not a hard limitation, it simply doesn't exist at this point. So this it not a matter of just a Tuya change, this needs a fundamental change to Home Assistant.
Sorry I misspoke earlier, I was thinking of exposing a service to control the reverse flag not an entity. The service would take in entity_id of the cover to adjust the reverse flag for though. (This is how the UniFi Protect integration available via HACS works to set a bunch of camera/etc related settings).
I'm not sure how it would need to be a fundamental change to Home Assistant though.
Sorry I misspoke earlier, I was thinking of exposing a service to control the reverse flag not an entity.
That is the same issue.
@emilinsweden What is the product category of your blinds? Afaik the only category that was changed was "ckmkzq"
@taljaardwp your issue will likely be fixed in 2021.12 This issue relates to 2021.12 reversing the states incorrectly when it worked 2021.11
@hudcap How do I find the category of product?
On the Tuya IoT platform, under devices, click the "debug device" link for the device in question. That should open a tab with device information, including product category.
the product category is cl
@frenck As best I can tell, PR #59427 only reversed "ckmkzq" That said, upon reviewing what I did there, I see I messed up—I flipped True to False as an initial fix, but then changed the logic to make it customizable on a per-category basis and never flipped it back, so the logic is wrong now. I fixed it in #61303. That said, "cl" should report it's state as "fully_open" or "fully_close" based on this, so I don't think my mistake would have caused OPs issue.
The button for up closes the covers and vice versa.
It looks like PR #59858 added some code to the open_cover
and close_cover
methods, and it looks like the values are reversed. open_cover
sets the value to 0 and close_cover
sets it to 100, but one of the docstrings says None is unknown, 0 is closed, 100 is fully open.
I think this might be causing the OP's issue.
The one motor that I reversed in the tuya app is going down but not up and the other "normally orientated" motors buttons are still reversed.
I believe there are 2 issues here. One is the control only half working and the other is the reversed state reporting.
The one motor that I reversed in the tuya app is going down but not up and the other "normally orientated" motors buttons are still reversed.
I don't fully understand what you mean here, but my garage door will open and not close, which I think is the same as your first issue. I think the second issue relates to my previous comment.
I'm going to make a PR that I believe will fix these issues, but I can't verify, as I don't have any smart blinds.
Okay that would be good. I will let you know if it fixes it.
What I mean is that I have Zemismart WiFi motors that you slide into a roller blind. They are AC powered. You can put them in from the right side or the left. If you slide the motor into the right side you need to change the up and down direction in the Tuya application because the motor is upside down!
Oh, got it. I noticed a parameter having to do with reversing—I'm guessing that change you made in the app flips its value. I can't be sure how that affects the state reporting.
I believe there are 2 issues here.
Rethinking it—looks like it's actually one issue, but with 2 sources. Hopefully my PR will fix it.
I saw you made a PR a couple of hours ago. You mean another one?
Yeah, the first one was not related to your issue. While looking at your issue I noticed a different problem with a PR I had made a month ago.
Why did you close the issue when it isn't fixed? The new update doesn't fix the problem unfortunately.
You updated to 2021.12 (non-beta) and it didn't solve either of your problems?
Yes and no difference with your PR
I suspect that it's because the percentage open/closed is reversed, but that will not change in HA until Tuya clarifies the interpretation of the percentage in the docs for cl
.
I submitted a request for them to do so.
The docs for cl
have been updated, but are not as clear as I would have hoped:
It seems that the percentage ignores the orientation of the motor, so its interpretation depends on the value of control_back_mode
. I am still not clear on which way means what.
@emilinsweden For a reversed motor and a non-reversed motor, and for both the open and closed states, can you please post labeled screenshots of the Device Debugging tab after clicking on Debug Device? After you change the state, you will need to click Update Device Status before taking the screenshot.
It should look something like this (this is my garage door opener):
Hello. The instructions do not work using the debug tool, they either go up and down a little bit when they are down or vice versa when they are up. They work great in the Tuya app though.. The states do not even change in the debug tool
Sorry for the delayed response. When you took these screenshots, were the shades open or closed?
The states do not even change in the debug tool
Did you click on Update Device Status?
Yes I did but it didn't matter, the state didn't change so I didn't check if they were up or down
So just to be clear, situation_set
stayed stuck on fully-open
and percent_state
on 100 no matter what position the shades were in?
I'm not sure how that makes sense, but if that's the case, then I think we're stuck.
Okay the state changes, I have some new screenshots.
Okay, that's great!
This firmly establishes that percent_state
is always referring to the percentage open.
I'm going to make another PR that will hopefully fix this.
@emilinsweden are you able to re-open this issue?
@hudcap No I don't think so as @frenck closed it to get the release out
I'm not sure what to make of the fact that situation_set
doesn't change...
@frenck can we please get your thoughts on those 4 screenshots?
Thanks!
Now my home assistant only able to open the curtain, but can't close on 2021.12 ( i was able to do so on 2021.11), it this similar to this fix?
The problem
Tuya covers. In my case Zemismart Wi-Fi blind motors. The button for up closes the covers and vice versa. One motor doesn’t even go up. Its position is reversed in the Tuya app.
What version of Home Assistant Core has the issue?
core-2021.12.0b0
What was the last working version of Home Assistant Core?
core-2021.11.5
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Tuya
Link to integration documentation on our website
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response