Skip to content

Cat litter box wrong Device type on add new device #1962

Description

@AndreyShpilevoy

Describe the bug
I have generic Cat litter box, identical to Tonepie t1pro (same product_id) that already have config in tuya-local devices
When I'm trying to add it to tuya-local I see only one option in the device type: tuya_smart_zigbee_door_sensor
There are no other options.
image

Device details:

Details ``` { "result": { "active_time": 1716920454, "bind_space_id": "154210895", "category": "msp", "create_time": 1682095017, "custom_name": "", "icon": "smart/icon/bay1627386467137Cb6K/c7ac5dd09c3e82ef441604d913b6795d.png", "id": "[CENSORED]", "ip": "[CENSORED]", "is_online": true, "lat": "51.8", "local_key": "[CENSORED]", "lon": "4.68", "model": "宠物猫砂盆", "name": "Automatic Cat Litter Box", "product_id": "5t7esmqqh92ssbe5", "product_name": "智能猫砂盆", "sub": false, "time_zone": "+02:00", "update_time": 1716933190, "uuid": "51d9d6dd5c55bb12" }, "success": true, "t": 1716934438151, "tid": "945a97311d3f11ef89139a1bd412573b" } ```

HomeAssistant log after adding toilet as door sensor:

Details ``` "data": { "name": "Tuya Smart Zigbee Door Sensor", "type": "tuya_smart_zigbee_door_sensor", "device_id": "**REDACTED**", "device_cid": "", "local_key": "**REDACTED**", "host": "**REDACTED**", "protocol_version": 3.4, "tinytuya_version": "1.13.2", "api_version_set": 3.4, "api_version_used": 3.4, "api_working": true, "status": {}, "cached_state": { "updated_at": 1716935367.798861, "6": 3395, "7": 1, "8": 348, "17": true, "22": 0, "101": false, "102": false, "104": false, "105": true, "109": true, "111": true, "114": false, "117": 3, "118": 15, "119": false, "120": false, "121": false, "122": false, "123": 1, "124": 15, "125": 4, "126": false, "127": 900 }, "pending_state": {}, "connected": true, "force_dps": [], "home_assistant": { "name": "Tuya Smart Zigbee Door Sensor", "name_by_user": null, "disabled": false, "disabled_by": null, "entities": [ { "disabled": false, "disabled_by": null, "entity_category": null, "device_class": null, "original_device_class": "door", "icon": null, "unit_of_measurement": null, "state": { "entity_id": "binary_sensor.tuya_smart_zigbee_door_sensor_door", "state": "off", "attributes": { "device_class": "door", "friendly_name": "Tuya Smart Zigbee Door Sensor Door" }, "last_changed": "2024-05-28T22:29:27.798989+00:00", "last_reported": "2024-05-28T22:29:27.798989+00:00", "last_updated": "2024-05-28T22:29:27.798989+00:00" } }, { "disabled": false, "disabled_by": null, "entity_category": "diagnostic", "device_class": null, "original_device_class": "battery", "icon": null, "unit_of_measurement": "%", "state": { "entity_id": "sensor.tuya_smart_zigbee_door_sensor_battery", "state": "unknown", "attributes": { "state_class": "measurement", "unit_of_measurement": "%", "device_class": "battery", "friendly_name": "Tuya Smart Zigbee Door Sensor Battery" }, "last_changed": "2024-05-28T22:29:27.799118+00:00", "last_reported": "2024-05-28T22:29:27.799118+00:00", "last_updated": "2024-05-28T22:29:27.799118+00:00" } } ] } } ```

To Reproduce
Add device to tuya-local via option Manually provide device connection information. - OK
Enter all necessary fields - OK
Select type - NOK
Finished - OK

Expected behavior
Add device to tuya-local via option Manually provide device connection information.
Enter all necessary fields
Select type tonepie_t1pro_catlitterbox
Finished

Additional context
Link to the device: link
Query Things Data Model:

Details ``` { "result": { "model": "{\"modelId\":\"000003wldi\",\"services\":[{\"actions\":[],\"code\":\"\",\"description\":\"\",\"events\":[],\"name\":\"默认服务\",\"properties\":[{\"abilityId\":6,\"accessMode\":\"ro\",\"code\":\"cat_weight\",\"description\":\"定时上报猫咪体重,支持多只猫咪称重,APP端可选手动分类不同猫咪不同体重\\n\",\"extensions\":{\"iconName\":\"icon-dp_mode\",\"attribute\":\"1024\"},\"name\":\"猫咪体重\",\"typeSpec\":{\"type\":\"value\",\"max\":10000,\"min\":600,\"scale\":0,\"step\":1,\"unit\":\"g\"}},{\"abilityId\":7,\"accessMode\":\"ro\",\"code\":\"excretion_times_day\",\"description\":\"猫咪排泄后,设备端上报当天排泄总次数,APP端进行展示\\n\",\"extensions\":{\"iconName\":\"icon-dp_0\",\"attribute\":\"1024\"},\"name\":\"每天排泄次数\",\"typeSpec\":{\"type\":\"value\",\"max\":60,\"min\":0,\"scale\":0,\"step\":1,\"unit\":\"times\"}},{\"abilityId\":8,\"accessMode\":\"ro\",\"code\":\"excretion_time_day\",\"description\":\"猫咪排泄后,设备端上报当次排泄时长,APP端进行展示不同时间的时长趋势\\n\",\"extensions\":{\"iconName\":\"icon-dp_time\",\"attribute\":\"1024\"},\"name\":\"如厕时长\",\"typeSpec\":{\"type\":\"value\",\"max\":1800,\"min\":0,\"scale\":0,\"step\":1,\"unit\":\"s\"}},{\"abilityId\":17,\"accessMode\":\"rw\",\"code\":\"deodorization\",\"description\":\"除臭杀菌开关\",\"extensions\":{\"iconName\":\"icon-dp_filter\",\"attribute\":\"1024\"},\"name\":\"除臭杀菌\",\"typeSpec\":{\"type\":\"bool\"}},{\"abilityId\":22,\"accessMode\":\"ro\",\"code\":\"fault\",\"description\":\"motor_fault:电机故障\\nprogram_fault:程序错误\\ng_sensor_fault:重力传感器感应异常\\n\",\"extensions\":{\"iconName\":\"icon-baojing\",\"attribute\":\"1024\"},\"name\":\"故障告警\",\"typeSpec\":{\"type\":\"bitmap\",\"label\":[\"motor_fault\",\"program_fault\",\"g_sensor_fault\"],\"maxlen\":3}},{\"abilityId\":101,\"accessMode\":\"rw\",\"code\":\"Clean\",\"description\":\"1 开始 0 关闭\",\"name\":\"一键清理\",\"typeSpec\":{\"type\":\"bool\"}},{\"abilityId\":102,\"accessMode\":\"rw\",\"code\":\"empty\",\"description\":\"1 开始 0取消\",\"name\":\"一键换砂\",\"typeSpec\":{\"type\":\"bool\"}},{\"abilityId\":103,\"accessMode\":\"ro\",\"code\":\"trash_status\",\"description\":\"0垃圾桶空,提示文字消失\\n1垃圾桶满,提示文字\",\"name\":\"垃圾桶状态\",\"typeSpec\":{\"type\":\"bool\"}},{\"abilityId\":104,\"accessMode\":\"ro\",\"code\":\"monitoring\",\"description\":\"当猫进入后, 出现文字提示, 猫咪离开后消失\",\"name\":\"桶内监测\",\"typeSpec\":{\"type\":\"bool\"}},{\"abilityId\":105,\"accessMode\":\"rw\",\"code\":\"Induction_Clean\",\"description\":\"\",\"name\":\"感应清理\",\"typeSpec\":{\"type\":\"bool\"}},{\"abilityId\":106,\"accessMode\":\"rw\",\"code\":\"clean_time\",\"description\":\"每个时间按照\\n小时分钟格式,每个占用2个字节,分钟和小时,十进制转16进制,如18:50,转为16进制为1232。\\n周期为二进制 星期或单次有效。\\n最多支持三个时间设置,未设置的用0补充。\\n举例:12320013200000000000\",\"name\":\"定时清理\",\"typeSpec\":{\"type\":\"raw\",\"maxlen\":128}},{\"abilityId\":107,\"accessMode\":\"rw\",\"code\":\"clean_time_switch\",\"description\":\"\",\"name\":\"定时清理开关\",\"typeSpec\":{\"type\":\"bool\"}},{\"abilityId\":108,\"accessMode\":\"rw\",\"code\":\"Clean_taste\",\"description\":\"每个时间按照\\n小时分钟格式,每个占用2个字节,分钟和小时,十进制转16进制,如18:50,转为16进制为1232。\\n周期为二进制 星期或单次有效。\\n最多支持三个时间设置,未设置的用0补充。\\n举例:12320013200000000000\",\"name\":\"版本识别\",\"typeSpec\":{\"type\":\"raw\",\"maxlen\":128}},{\"abilityId\":109,\"accessMode\":\"rw\",\"code\":\"Clean_tasteSwitch\",\"description\":\"\",\"name\":\"备用版本识别\",\"typeSpec\":{\"type\":\"bool\"}},{\"abilityId\":110,\"accessMode\":\"rw\",\"code\":\"not_disturb\",\"description\":\"\",\"name\":\"免打扰\",\"typeSpec\":{\"type\":\"raw\",\"maxlen\":128}},{\"abilityId\":111,\"accessMode\":\"rw\",\"code\":\"Clean_notice\",\"description\":\"红外功能开启或关闭\",\"name\":\"关闭红外以适应猫屋\",\"typeSpec\":{\"type\":\"bool\"}},{\"abilityId\":112,\"accessMode\":\"rw\",\"code\":\"toilet_notice\",\"description\":\"\",\"name\":\"如厕通知\",\"typeSpec\":{\"type\":\"bool\"}},{\"abilityId\":113,\"accessMode\":\"rw\",\"code\":\"Net_notice\",\"description\":\"只有触发故障时,可用于桶仓复位\",\"name\":\"桶仓复位\",\"typeSpec\":{\"type\":\"bool\"}},{\"abilityId\":114,\"accessMode\":\"rw\",\"code\":\"child_lock\",\"description\":\"\",\"name\":\"童锁\",\"typeSpec\":{\"type\":\"bool\"}},{\"abilityId\":115,\"accessMode\":\"rw\",\"code\":\"calibration\",\"description\":\"calibration\",\"extensions\":{\"trigger\":\"direct\"},\"name\":\"秤校准\",\"typeSpec\":{\"type\":\"bool\"}},{\"abilityId\":116,\"accessMode\":\"rw\",\"code\":\"unit\",\"description\":\"\",\"name\":\"单位\",\"typeSpec\":{\"type\":\"bool\"}},{\"abilityId\":117,\"accessMode\":\"rw\",\"code\":\"induction_delay\",\"description\":\"\",\"name\":\"清理等待时间\",\"typeSpec\":{\"type\":\"value\",\"max\":60,\"min\":0,\"scale\":0,\"step\":1,\"unit\":\"分钟m\"}},{\"abilityId\":118,\"accessMode\":\"rw\",\"code\":\"induction_interval\",\"description\":\"\",\"name\":\"清理间隔时间\",\"typeSpec\":{\"type\":\"value\",\"max\":120,\"min\":0,\"scale\":0,\"step\":1,\"unit\":\"分钟m\"}},{\"abilityId\":119,\"accessMode\":\"rw\",\"code\":\"store_full_notify\",\"description\":\"\",\"name\":\"集便仓满通知\",\"typeSpec\":{\"type\":\"bool\"}},{\"abilityId\":120,\"accessMode\":\"rw\",\"code\":\"odourless\",\"description\":\"\",\"name\":\"立即净味\",\"typeSpec\":{\"type\":\"bool\"}},{\"abilityId\":121,\"accessMode\":\"rw\",\"code\":\"smart_clean\",\"description\":\"\",\"name\":\"智能清理\",\"typeSpec\":{\"type\":\"bool\"}},{\"abilityId\":122,\"accessMode\":\"rw\",\"code\":\"not_disturb_Switch\",\"description\":\"\",\"name\":\"免打扰开关\",\"typeSpec\":{\"type\":\"bool\"}},{\"abilityId\":123,\"accessMode\":\"rw\",\"code\":\"usage_times\",\"description\":\"\",\"extensions\":{\"trigger\":\"direct\"},\"name\":\"使用次数\",\"typeSpec\":{\"type\":\"value\",\"max\":100,\"min\":1,\"scale\":0,\"step\":1,\"unit\":\"times\"}},{\"abilityId\":124,\"accessMode\":\"rw\",\"code\":\"capacity_calibration\",\"description\":\"\",\"extensions\":{\"trigger\":\"direct\"},\"name\":\"集便仓便满校准\",\"typeSpec\":{\"type\":\"value\",\"max\":15,\"min\":0,\"scale\":0,\"step\":1,\"unit\":\"\"}},{\"abilityId\":125,\"accessMode\":\"rw\",\"code\":\"sand_surface_calibration\",\"description\":\"\",\"extensions\":{\"trigger\":\"direct\"},\"name\":\"沙面校准\",\"typeSpec\":{\"type\":\"value\",\"max\":6,\"min\":0,\"scale\":0,\"step\":1,\"unit\":\"\"}},{\"abilityId\":126,\"accessMode\":\"rw\",\"code\":\"auto_deordrizer\",\"description\":\"\",\"name\":\"自动净味\",\"typeSpec\":{\"type\":\"bool\"}},{\"abilityId\":127,\"accessMode\":\"rw\",\"code\":\"detection_sensitivity\",\"description\":\"\",\"extensions\":{\"trigger\":\"direct\"},\"name\":\"检测灵敏度\",\"typeSpec\":{\"type\":\"value\",\"max\":1500,\"min\":600,\"scale\":0,\"step\":100,\"unit\":\"g\"}},{\"abilityId\":128,\"accessMode\":\"rw\",\"code\":\"number\",\"description\":\"\",\"extensions\":{\"trigger\":\"direct\"},\"name\":\"number\",\"typeSpec\":{\"type\":\"value\",\"max\":999999,\"min\":0,\"scale\":0,\"step\":1,\"unit\":\"\"}}]}]}" }, "success": true, "t": 1716935976290, "tid": "29206e411d4311ef96b856da78f307aa" } ```
Same type of device with table of functions that I used to setup it in locat-tuya: [link](https://github.com/tuya/tuya-home-assistant/issues/935)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions