tuya / tuya-home-assistant

Home Assistant integration for controlling Powered by Tuya (PBT) devices using Tuya Open API, maintained by the Home Assistant Community and Tuya Developer Team.
MIT License
879 stars 207 forks source link

Curtain switch under Product Category "qt" not added as entity #729

Open velijv opened 2 years ago

velijv commented 2 years ago

Describe the bug Curtain switch under Product Category "qt" not added as entity in HA.

Expected behavior Would like it to work. It has 3 modes - Up, Stop, Down. Proposed solution: use clkg Curtain Switch code to make it work?

Screenshots image Product Name Curtain switch
Device ID 43001313807d3a28a295
Product Category qt
Device Status Online
Activated At 2021-04-30 16:49:30

Home Assistant Version 2021.12.1

Device info (please complete the following information, which can be found in log): https://www.aliexpress.com/item/Zemismart-Electric-WiFi-Smart-Roller-Shade-Motor-Tuya-Alexa-Google-Home-Motorized-Curtain-Switch/33012061596.html?spm=a2g0s.9042311.0.0.27424c4d90HHwK Zemismart Electric WiFi Smart Roller Shade Motor Tuya Alexa Google Home Motorized Curtain Switch

Additional context It works fine on Google Home / Google Assistant natively. To get it working in HA, I hacked a nasty workaround:

assistant_relay: url: http://192.168.31.18:3000/assistant method: POST content_type: 'application/json' payload: '{"command":"{{ command }}", "user":"Veli"}'

`cover:

inreinbek commented 2 years ago

I've no idea if it helps by develop any supports ... (I can't code any python)

Here's the result of specifications and properties of the device

{ "result": { "category": "qt", "functions": [ { "code": "control", "desc": "{\"range\":[\"open\",\"stop\",\"close\"]}", "name": "控制", "type": "Enum", "values": "{\"range\":[\"open\",\"stop\",\"close\"]}" } ], "status": [ { "code": "control", "name": "控制", "type": "Enum", "values": "{\"range\":[\"open\",\"stop\",\"close\"]}" } ] }, "success": true, "t": 1639342166696 }

inreinbek commented 2 years ago

Pls take also a look at this: https://github.com/tuya/tuya-home-assistant/issues/728

inreinbek commented 2 years ago

I've found a workaround for RJ-Curtain switch (qt): design a scene for each curtain and each term in the app: E.g. "curtain open" and "curtain closed" The scenes will be read by home assistant and you're able to use it in a automation. There's no state read, but you can fully open or close the curtain.