rospogrigio / localtuya

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

localtuya doesn't recognize tuya device correctly #1093

Open janivr opened 1 year ago

janivr commented 1 year ago

The problem

I have a climate device that is not identified well in localtuya. The device enables setting temperature, but I can't find a way to send the command via localtuya integration. All other commands work well.

This is the device specification

{ "result": { "category": "kt", "functions": [ { "code": "switch", "desc": "{}", "name": "开关", "type": "Boolean", "values": "{}" }, { "code": "temp_set", "desc": "{\"min\":16,\"unit\":\"℃\",\"scale\":0,\"max\":32,\"step\":1}", "name": "设置温度", "type": "Integer", "values": "{\"min\":16,\"unit\":\"℃\",\"scale\":0,\"max\":32,\"step\":1}" }, { "code": "fan_speed_enum", "desc": "{\"range\":[\"sleep\",\"health\",\"natural\",\"strong\",\"auto\",\"low\",\"middle\",\"high\",\"mute\"]}", "name": "风速模式", "type": "Enum", "values": "{\"range\":[\"sleep\",\"health\",\"natural\",\"strong\",\"auto\",\"low\",\"middle\",\"high\",\"mute\"]}" }, { "code": "mode", "desc": "{\"range\":[\"auto\",\"cold\",\"hot\",\"wet\",\"wind\"]}", "name": "工作模式", "type": "Enum", "values": "{\"range\":[\"auto\",\"cold\",\"hot\",\"wet\",\"wind\"]}" } ], "status": [ { "code": "switch", "name": "开关", "type": "Boolean", "values": "{}" }, { "code": "temp_set", "name": "设置温度", "type": "Integer", "values": "{\"min\":16,\"unit\":\"℃\",\"scale\":0,\"max\":32,\"step\":1}" }, { "code": "temp_current", "name": "当前温度", "type": "Integer", "values": "{\"min\":-2000,\"scale\":0,\"unit\":\"℃\",\"max\":2000,\"step\":1}" }, { "code": "fan_speed_enum", "name": "风速模式", "type": "Enum", "values": "{\"range\":[\"sleep\",\"health\",\"natural\",\"strong\",\"auto\",\"low\",\"middle\",\"high\",\"mute\"]}" }, { "code": "mode", "name": "工作模式", "type": "Enum", "values": "{\"range\":[\"auto\",\"cold\",\"hot\",\"wet\",\"wind\"]}" } ] },

}

Thanks

Environment

Steps to reproduce

1.

Configuration configuration.yaml or config_flow

DP dump

Provide Home Assistant taceback/logs

Additional information

janivr commented 1 year ago

Please help. thanks

frontendbuddy commented 1 year ago

Do you know the dp ids of your device? There is a service called local tuya set dp or something like that so you could sent a command to your device with a custom made button.

ejalal commented 1 year ago

Hi @janivr I have a Tuya driven AC with similar specs I have temperature working but not the rest of the features. What features work for you ? Can you share a screenshot or your device config in Localtuya UI please ?

janivr commented 1 year ago

Hi @janivr I have a Tuya driven AC with similar specs I have temperature working but not the rest of the features. What features work for you ? Can you share a screenshot or your device config in Localtuya UI please ?

I added each one of the commands manually. Set temp (set point) Set mode Set fan mode

In my case they used the same DP to report status and configure parameters.

remlei commented 1 year ago

there are thousands of different configuration of tuya devices in the market, you cant really just blame the integration for not getting it supported as a device class.

the only solution here is use the official tuya integration or use localtuya and add all the entities manually 1 by 1. the only hard part here is basically guess which DP correspond to which function.

looking at that what you got there. it looks like you have a AC unit that have one dedicated to cool down the room and another one as regular fan only. both have their own temperature sensor for some reason. Looks like the manufacturer just slap a AC unit with a regular electric fan on it all together in 1 package and call it a day.