core icon indicating copy to clipboard operation
core copied to clipboard

Tuya Cover Controller opened/closed inverted

Open DickSwart opened this issue 3 years ago • 35 comments

The problem

First off, thank you for all the hard work for the new Tuya integration.

My issue is the cover controller of the Tuya integration. It is reporting a state of unknown for all my curtain rails and the open and close serves is inverted.

Service

  • cover.close_cover open my curtains
  • cover.open_cover close my curtains

All three of the curtain rails are the Zemismart New Design WiFi Curtain Motor Tuya Smart Life Customized Electric Curtains Track with RF Remote Alexa Echo Control

It used to work fine with the original Tuya integration, reported the state and controls were not inverted.

Let me know if there is any more info you need to help problem-solve this?

What version of Home Assistant Core has the issue?

2021.11.0

What was the last working version of Home Assistant Core?

2021.9.7

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Tuya

Link to integration documentation on our website

https://www.home-assistant.io/integrations/tuya/

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

Tuya IoT Platform Logs per device

Device Name: Sliding Door Curtain Actual State: Open

[
  {
    "code": "control",
    "value": "stop"
  },
  {
    "code": "percent_control",
    "value": 0
  }
]

Device Name: Small Window Curtain Actual State: Closed

[
  {
    "code": "control",
    "value": "stop"
  },
  {
    "code": "percent_control",
    "value": 100
  }
]

Device Name: Corner Curtain Actual State: Closed

[
  {
    "code": "control"
  },
  {
    "code": "percent_control",
    "value": 0
  }
]

DickSwart avatar Nov 04 '21 17:11 DickSwart

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)


tuya documentation tuya source (message by IssueLinks)

I noticed the same issue with all my covers (blitzwolf SS6). since I updated to Tuya V2 the covers are reverted, so showing down when they are completely open and the reverse. In localtuya it shows just fine (even saying that I'm not able to use the up/down as they are set as position controlled - strange though).

carlosCastro99 avatar Nov 17 '21 15:11 carlosCastro99

Hello,

Same problem here.

Curtain's states in HA are different from Tuya IoT Platform. For example one curtain is currently fully open (100%) and Tuya IoT Platform returns 100% however HA returns 0%

Tuya IoT Platform : image

Home Assistant : image

Entity : image

NeWoKiKi avatar Jan 03 '22 16:01 NeWoKiKi

Same problem here: inverted status on Tuya cover devices.

t3lmoazevedo avatar Jan 14 '22 09:01 t3lmoazevedo

Same here :-(

shaynahum avatar Jan 21 '22 15:01 shaynahum

Please, don't respond with "same problem", "+1", "I have it too" and similar. Instead, if you experience the same issue as the issue listed on GitHub, use the 👍 reaction on the bug report.

Thanks 👍

frenck avatar Jan 24 '22 18:01 frenck

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar May 30 '22 18:05 github-actions[bot]

Same problem here: inverted status on Tuya cover devices. Hi,

Has there been a solution to the problem of reverse treatment?

Lesboy72 avatar May 31 '22 16:05 Lesboy72

Hello,

Same problem here.

Curtain's states in HA are different from Tuya IoT Platform. For example one curtain is currently fully open (100%) and Tuya IoT Platform returns 100% however HA returns 0%

Tuya IoT Platform : image

Home Assistant : image

Entity : image

Hi,

Has there been a solution to the problem of reverse treatment?

Lesboy72 avatar May 31 '22 17:05 Lesboy72

HA slider allows me to set the position to a % that is (100% - the position % in Smart Life). Blind is down/closed = 0% slider in HA & 100% slider in Smart Life. HA Open button is disabled. Close button is enabled but has no effect. Blind is up/open = 100% slider in HA & 0% slider in Smart Life - Blind is open - HA Close button works. Open button in HA is disabled Close button is enabled and works.

Slider in HA sets the position of the blind (incorrectly). Slider in Smart Life is not reflected in HA slider HA Call Service Cover: Open opens the blind HA Call Service Cover: Close closes the blind

using the Tuya IoT portal sending Open/Close with a position will move to the position, sending Open/Close without a position moves to 0%/100%

rwitlmarkf avatar Jun 07 '22 17:06 rwitlmarkf

Same problem here, just installed the Curtains and on HomeAssistant they are all inverted, any workaround i can do for now?

blastbeng avatar Oct 30 '22 12:10 blastbeng

Hello, I also have the same problem since the beginning. the solution (he work fine for me and you could set up the % of cover opening) is to work around the problem by creating virtual cover in configuration.yaml with file editor or other : you must have somethink like that : then restart home assistant (i don't remeber where i find this solution)

Capture d’écran 2022-11-07 184500

cover:

  • platform: template covers: volet_parents_inverse: friendly_name: 'Volet Parents' position_template: "{{ 100 - (state_attr('cover.volet_parents_tuya', 'current_position') | int) }}" open_cover: service: cover.close_cover data: entity_id: cover.volet_parents_tuya close_cover: service: cover.open_cover data: entity_id: cover.volet_parents_tuya stop_cover: service: cover.stop_cover data: entity_id: cover.volet_parents_tuya set_cover_position: service: cover.set_cover_position data_template: entity_id: cover.volet_parents_tuya position: "{{ 100 - position }}"

francecisco avatar Nov 07 '22 17:11 francecisco

For anyone having this problem, I solved eveything using the localtuya addon installable via HACS.

https://github.com/rospogrigio/localtuya

I have 5 electric shutter and 4 dimmers.

Electric shutters are working good and flawlessly under localtuya, and most important... they are not inverted!!

The dimmers are configured as "switch" on localtuya, unfortunately localtuya has no configuration for the "dimmable" lights. but If you configure em as switch, you can still turn on/off.

blastbeng avatar Nov 09 '22 09:11 blastbeng

Having the same issue. The shutters appear as curtains and are reversed compared to how they appear in Tuya Smart.

arnenys89 avatar Jan 02 '23 20:01 arnenys89

👍 issue. my blinds are sub devices so not sure if 'Localtuya' on HACS is an option. Localtuya does not show the sub devices only the hub

  • Happy new year to all [tuya-c3e5babb29f55b010fe619f7da86e681-Dining 1-4e7df5d4ec905f95b7b1aaa76c25d1e7.json.txt] (https://github.com/home-assistant/core/files/10473555/tuya-c3e5babb29f55b010fe619f7da86e681-Dining.1-4e7df5d4ec905f95b7b1aaa76c25d1e7.json.txt)

Splinter911 avatar Jan 22 '23 00:01 Splinter911

👍 issue. my blinds are sub devices so not sure if 'Localtuya' on HACS is an option. Localtuya does not show the sub devices only the hub

  • Happy new year to all [tuya-c3e5babb29f55b010fe619f7da86e681-Dining 1-4e7df5d4ec905f95b7b1aaa76c25d1e7.json.txt] (https://github.com/home-assistant/core/files/10473555/tuya-c3e5babb29f55b010fe619f7da86e681-Dining.1-4e7df5d4ec905f95b7b1aaa76c25d1e7.json.txt)

Same thing for me. My blinds motor (AM43) connect to a Zigbee hub and then to Tuya IoT. The position of the blinds is inverted in relation to the "Smart Life" app.

darthstark1138 avatar Jan 25 '23 16:01 darthstark1138

My device is

smart motor (qtemqjy7axczkkls) by Tuya

Tuya app can connect no problem. HA Tuya can connect but reversed - LocalTuya can only connect to the hub. Reaching out for help to the community . Best regards Splinter911

Splinter911 avatar Jan 29 '23 18:01 Splinter911

👍 issue. my blinds are sub devices so not sure if 'Localtuya' on HACS is an option. Localtuya does not show the sub devices only the hub

  • Happy new year to all [tuya-c3e5babb29f55b010fe619f7da86e681-Dining 1-4e7df5d4ec905f95b7b1aaa76c25d1e7.json.txt] (https://github.com/home-assistant/core/files/10473555/tuya-c3e5babb29f55b010fe619f7da86e681-Dining.1-4e7df5d4ec905f95b7b1aaa76c25d1e7.json.txt)

Same thing for me. My blinds motor (AM43) connect to a Zigbee hub and then to Tuya IoT. The position of the blinds is inverted in relation to the "Smart Life" app.

Splinter911 avatar Feb 19 '23 22:02 Splinter911

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

"NH-ZS 108" still in inverse state

Home Assistant 2023.5.3 Supervisor 2023.04.1 Operating System 10.1 Frontend 20230503.3 - latest

egennric avatar May 21 '23 10:05 egennric

Still issue remains for SUNFREE honeycomb Tuya shutters. Why there is no option to inverse during setup or later, this issue is open from Nov 4, 2021!!

brijeshsinghparihar avatar Aug 14 '23 18:08 brijeshsinghparihar

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

problem still exist in 2023.11.2 config_entry-tuya-0b1e179775ea978e6ea62b86463a0f55.json.txt

egennric avatar Nov 12 '23 19:11 egennric

Yeah, this is very annoying. It's the only thing preventing me from automating the natural lighting in my office based on the sun's position.

darthstark1138 avatar Nov 12 '23 21:11 darthstark1138

This is very frustrating, all my curtains are operating in reverse

KatsuoRyuu avatar Dec 06 '23 02:12 KatsuoRyuu

guys, it's pretty simple to solve this. This is a config from the motor,...

https://www.zigbee2mqtt.io/devices/TS0601_cover_1.html

Send: { "options":{ "reverse_direction": true } }

And it will work correct

DNAngelX avatar Dec 31 '23 15:12 DNAngelX

guys, it's pretty simple to solve this. This is a config from the motor,...

https://www.zigbee2mqtt.io/devices/TS0601_cover_1.html

Send: { "options":{ "reverse_direction": true } }

And it will work correct

All it does is show the correct status initially. But pressing "Open" or "CLose" still make the curtain go until halfway and then reverse direction (and flip the status).

darthstark1138 avatar Jan 01 '24 21:01 darthstark1138

Correct this still not solvedSent from my mobile deviceThank you  DerekOn Jan 1, 2024, at 4:22 PM, mvhecht @.***> wrote:

guys, it's pretty simple to solve this. This is a config from the motor,... https://www.zigbee2mqtt.io/devices/TS0601_cover_1.html Send: { "options":{ "reverse_direction": true } } And it will work correct

All it does is show the correct status initially. But pressing "Open" or "CLose" still make the curtain go until halfway and then reverse direction (and flip the status).

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

Splinter911 avatar Jan 01 '24 23:01 Splinter911

My thanks to @francecisco.

It's a bit confusing for newbies (such as myself) to sort this out. Specially because there are just too many topics on this without the full detail in how to do it.

So, I've used @francecisco 's suggestion to include my curtains and it worked as a charm.

Step by Step:

1 - You'll need to add the code from the original post https://github.com/home-assistant/core/issues/59099#issuecomment-1305966088 below into your configuration.yaml file. (I use the Studio Code Server Add-on in HA) 2 - Replace all 'cover.office_shutter_curtain' for whatever is the device in your HA config that you want it to apply in the code below 3 - There was a bit of manual adjusting of spaced for yaml to be happy. 4 - be sure to check in Developer Tools / Check Configuration prior to restart.

bernardofortes avatar Mar 11 '24 18:03 bernardofortes

My thanks to @francecisco.

It's a bit confusing for newbies (such as myself) to sort this out. Specially because there are just too many topics on this without the full detail in how to do it.

So, I've used @francecisco 's suggestion to include my curtains and it worked as a charm.

Step by Step:

1 - You'll need to add the code from the original post #59099 (comment) below into your configuration.yaml file. (I use the Studio Code Server Add-on in HA) 2 - Replace all 'cover.office_shutter_curtain' for whatever is the device in your HA config that you want it to apply in the code below 3 - There was a bit of manual adjusting of spaced for yaml to be happy. 4 - be sure to check in Developer Tools / Check Configuration prior to restart.

Yes, it worked for me too. Here it's the configuration.yaml formatted:

cover:
  platform: template
  covers:
    caique_curtain:
      friendly_name: 'Curtain'
      position_template: "{{ 100 - (state_attr('cover.zemismart_zigbee_roller_motor_curtain', 'current_position') | int) }}"
      open_cover:
        service: cover.close_cover
        data:
          entity_id: cover.zemismart_zigbee_roller_motor_curtain
      close_cover:
        service: cover.open_cover
        data:
          entity_id: cover.zemismart_zigbee_roller_motor_curtain
      stop_cover:
        service: cover.stop_cover
        data:
          entity_id: cover.zemismart_zigbee_roller_motor_curtain
      set_cover_position:
        service: cover.set_cover_position
        data_template:
          entity_id: cover.zemismart_zigbee_roller_motor_curtain
          position: "{{ 100 - position }}"

CaiqueR avatar May 03 '24 22:05 CaiqueR