make-all / tuya-local

Local support for Tuya devices in Home Assistant
MIT License
1.18k stars 481 forks source link

Request support for Klarstein Skyscraper Ice Smart 4 in 1 Air Cooler #2104

Closed Xeevis closed 3 days ago

Xeevis commented 1 month ago
Marketing info ![image](https://github.com/user-attachments/assets/fa45c986-2463-42ee-9655-7316e681b75b)

Log Message

Device matches mellerware_citymove_vacuum with quality of 14%. DPS: {"updated_at": 1720781396.8486292, "1": true, "2": "middle", "3": "normal", "10": true, "11": "cancel", "12": 0, "15": true}

Information about DPS mappings

{"1":"Main Switch","2":"Fan Speed","3":"Fan Mode","10":"Swing","11":"Countdown","12":"Remaining Time","15":"Cold"}
"model": {
            "modelId": "000004xfjc",
            "services": [
                {
                    "actions": [],
                    "code": "",
                    "description": "",
                    "events": [],
                    "name": "默认服务",
                    "properties": [
                        {
                            "abilityId": 1,
                            "accessMode": "rw",
                            "code": "switch",
                            "description": "",
                            "extensions": {
                                "iconName": "icon-dp_power3",
                                "attribute": "1025"
                            },
                            "name": "总开关",
                            "typeSpec": {
                                "type": "bool"
                            }
                        },
                        {
                            "abilityId": 2,
                            "accessMode": "rw",
                            "code": "fan_speed_enum",
                            "description": "与DP20互斥",
                            "extensions": {
                                "iconName": "icon-dp_wind",
                                "attribute": "1152"
                            },
                            "name": "风速",
                            "typeSpec": {
                                "type": "enum",
                                "range": [
                                    "low",
                                    "middle",
                                    "high"
                                ]
                            }
                        },
                        {
                            "abilityId": 3,
                            "accessMode": "rw",
                            "code": "fan_mode",
                            "description": "",
                            "extensions": {
                                "iconName": "icon-a_function_eco",
                                "attribute": "1024"
                            },
                            "name": "风类",
                            "typeSpec": {
                                "type": "enum",
                                "range": [
                                    "normal",
                                    "nature",
                                    "sleep"
                                ]
                            }
                        },
                        {
                            "abilityId": 10,
                            "accessMode": "rw",
                            "code": "switch_horizontal",
                            "description": "DP17与DP10互斥",
                            "extensions": {
                                "iconName": "icon-a_function_hs",
                                "attribute": "1024"
                            },
                            "name": "左右摆风",
                            "typeSpec": {
                                "type": "bool"
                            }
                        },
                        {
                            "abilityId": 11,
                            "accessMode": "rw",
                            "code": "countdown_set",
                            "description": "0~7.5h,步进值0.5h",
                            "extensions": {
                                "iconName": "icon-dp_time2",
                                "attribute": "1024"
                            },
                            "name": "定时关机",
                            "typeSpec": {
                                "type": "enum",
                                "range": [
                                    "cancel",
                                    "0_5h",
                                    "1h",
                                    "1_5h",
                                    "2h",
                                    "2_5h",
                                    "3h",
                                    "3_5h",
                                    "4h",
                                    "4_5h",
                                    "5h",
                                    "5_5h",
                                    "6h",
                                    "6_5h",
                                    "7h",
                                    "7_5h"
                                ]
                            }
                        },
                        {
                            "abilityId": 12,
                            "accessMode": "ro",
                            "code": "countdown_left",
                            "description": "",
                            "extensions": {
                                "iconName": "icon-dp_time2",
                                "attribute": "1024"
                            },
                            "name": "剩余工作时间",
                            "typeSpec": {
                                "type": "value",
                                "max": 800,
                                "min": 0,
                                "scale": 0,
                                "step": 1,
                                "unit": "min"
                            }
                        },
                        {
                            "abilityId": 15,
                            "accessMode": "rw",
                            "code": "humidifier",
                            "description": "",
                            "extensions": {
                                "iconName": "icon-shidu",
                                "attribute": "1152"
                            },
                            "name": "制冷/加湿",
                            "typeSpec": {
                                "type": "bool"
                            }
                        }
                    ]
                }
            ]
        }

Product ID

{
      "category": "ks",
      "custom_name": "",
      "icon": "smart/icon/ay1557826918513Qbvsz/31be83839863d73f03864d5cf24d7b7f.png",
      "id": "bf34ff4b03c1ad9c6bqznu",
      "is_online": true,
      "model": "10040205/06/07/08",
      "name": "Skyscraper Ice Smart",
      "product_id": "bhaszy5l8iicyjg0",
      "product_name": "Skyscraper Ice Smart",
      "sub": false
    }

Information about how the device functions

https://res.cloudinary.com/chal-tec/image/upload/bbg/10040206/bda/10040206_BDA_DE-EN-ES-FR-IT.pdf

Xeevis commented 1 month ago

Working config to speed things up (not sure about translations, icons, classes etc, also DPS 15 should probably be called something like "Cooling" or "Humidifier")

image image

name: Skyscraper Ice Smart
products:
  - id: bhaszy5l8iicyjg0
primary_entity:
  entity: fan
  dps:
    - id: 1
      name: switch
      type: boolean
      mapping:
        - dps_val: false
        - dps_val: true
    - id: 2
      name: speed
      type: string
      mapping:
        - dps_val: low
          value: 33
        - dps_val: middle
          value: 66
        - dps_val: high
          value: 100
    - id: 3
      name: preset_mode
      type: string
      optional: true
      mapping:
        - dps_val: normal
          value: normal
        - dps_val: nature
          value: nature
        - dps_val: sleep
          value: sleep
    - id: 10
      type: boolean
      name: oscillate
secondary_entities:
  - entity: select
    translation_key: timer
    category: config
    dps:
      - id: 11
        name: option
        type: string
        mapping:
          - dps_val: "cancel"
            value: Cancel
          - dps_val: "0_5h"
            value: "0,5 hour"
          - dps_val: "1h"
            value: "1 hour"
          - dps_val: "1_5h"
            value: "1,5 hours"
          - dps_val: "2h"
            value: "2 hours"
          - dps_val: "2_5h"
            value: "2,5 hours"
          - dps_val: "3h"
            value: "3 hours"
          - dps_val: "3_5h"
            value: "3,5 hours"
          - dps_val: "4h"
            value: "4 hours"
          - dps_val: "4_5h"
            value: "4,5 hours"
          - dps_val: "5h"
            value: "5 hours"
          - dps_val: "5_5h"
            value: "5,5 hours"
          - dps_val: "6h"
            value: "6 hours"
          - dps_val: "6_5h"
            value: "6,5 hours"
          - dps_val: "7h"
            value: "7 hours"
          - dps_val: "7_5h"
            value: "7,5 hours"
  - entity: sensor
    translation_key: time_remaining
    class: duration
    dps:
      - id: 12
        type: integer
        name: sensor
        unit: min
  - entity: switch
    dps:
      - id: 15
        type: boolean
        name: switch
make-all commented 3 days ago

Already added as PR #2136 in previous release.