rospogrigio / localtuya

local handling for Tuya devices
GNU General Public License v3.0
2.81k stars 542 forks source link

cover Open_Close_Stop Commands Set does not include more options #791

Open JudahBella opened 2 years ago

JudahBella commented 2 years ago

The Open_Close_Stop Commands Set has the following:

However, the clothes dryer rack that I'm trying to add to LocalTuya uses 'up' 'down' 'stop' instead.

{
    "code": "control",
    "desc": "control",
    "name": "control",
    "type": "Enum",
    "values": "{\"range\":[\"stop\",\"up\",\"down\"]}"
},

Is it possible to add this permutation, or is there any way to customise it myself?

JudahBella commented 2 years ago

I managed to fix this by editing cover.py:

Add the following after COVER_12_CMDS = "1_2_3": COVER_UPDOWN_CMDS = "up_down_stop"

Append COVER_UPDOWN_CMDS to the following: vol.Optional(CONF_COMMANDS_SET): vol.In( [COVER_ONOFF_CMDS, COVER_OPENCLOSE_CMDS, COVER_FZZZ_CMDS, COVER_12_CMDS, COVER_UPDOWN_CMDS] ),

Would be great if custom commands could be added from within the GUI.

theshop35 commented 2 years ago

i have the same issue please help instruction set supported by the my smart curtain device: "result": { "category": "cl", "functions": [ { "code": "control", "desc": "control", "name": "control", "type": "Enum", "values": "{\"range\":[\"open\",\"stop\",\"close\",\"continue\"]}"

thanks

JudahBella commented 2 years ago

"values": "{"range":["open","stop","close","continue"]}"

Have you tried open_close_stop? I only had to create my own because there was no up_down_stop.

theshop35 commented 2 years ago

"values": "{"range":["open","stop","close","continue"]}"

Have you tried open_close_stop? I only had to create my own because there was no up_down_stop.

i tried open close stop its not working, tried all options.