Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose more accessories for device #507

Open
ilikourou opened this issue Nov 16, 2024 · 0 comments
Open

Expose more accessories for device #507

ilikourou opened this issue Nov 16, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@ilikourou
Copy link

ilikourou commented Nov 16, 2024

Device Infomation JSON File

[
  {
    "active_time": 1731429408,
    "biz_type": 0,
    "category": "cs",
    "create_time": 1731429408,
    "icon": "smart/icon/ay15627280789418zuc0/c9965b6ee653581041483aca1c379def.png",
    "id": "XXX",
    "ip": "XX.XX.XX.XX",
    "lat": "41.12",
    "local_key": "XXX",
    "lon": "25.41",
    "model": "",
    "name": "Juro Pro Special Edition 16L",
    "online": true,
    "owner_id": "210641046",
    "product_id": "y3o1suysyi4nw96a",
    "product_name": "Juro Pro Special Edition 16L",
    "status": [
      {
        "code": "anion",
        "value": true
      },
      {
        "code": "countdown",
        "value": "0"
      },
      {
        "code": "dehumidify_1",
        "value": 50
      },
      {
        "code": "fan_speed_enum",
        "value": "high"
      },
      {
        "code": "fault",
        "value": 0
      },
      {
        "code": "indoor_humidity",
        "value": 48
      },
      {
        "code": "indoor_temperature",
        "value": 18
      },
      {
        "code": "mode",
        "value": "dehumidify"
      },
      {
        "code": "switch",
        "value": true
      }
    ],
    "sub": false,
    "time_zone": "+02:00",
    "uid": "eu1730645409741Updo4",
    "update_time": 1731763108,
    "uuid": "14800348483fda1d07d9",
    "schema": [
      {
        "code": "anion",
        "mode": "rw",
        "type": "Boolean",
        "property": {}
      },
      {
        "code": "countdown",
        "mode": "rw",
        "type": "Enum",
        "property": {
          "range": [
            "0",
            "1",
            "2",
            "3",
            "4",
            "5",
            "6",
            "7",
            "8",
            "9",
            "10",
            "11",
            "12",
            "13",
            "14",
            "15",
            "16",
            "17",
            "18",
            "19",
            "20",
            "21",
            "22",
            "23",
            "24"
          ]
        }
      },
      {
        "code": "dehumidify_1",
        "mode": "rw",
        "type": "Integer",
        "property": {
          "unit": "%",
          "min": 35,
          "max": 80,
          "scale": 0,
          "step": 5
        }
      },
      {
        "code": "fan_speed_enum",
        "mode": "rw",
        "type": "Enum",
        "property": {
          "range": [
            "low",
            "mid",
            "high"
          ]
        }
      },
      {
        "code": "fault",
        "mode": "ro",
        "type": "Bitmap",
        "property": {
          "label": [
            "1",
            "2",
            "3"
          ],
          "maxlen": 3
        }
      },
      {
        "code": "indoor_humidity",
        "mode": "ro",
        "type": "Integer",
        "property": {
          "unit": "%",
          "min": 20,
          "max": 95,
          "scale": 0,
          "step": 1
        }
      },
      {
        "code": "indoor_temperature",
        "mode": "ro",
        "type": "Integer",
        "property": {
          "unit": "",
          "min": -1,
          "max": 76,
          "scale": 0,
          "step": 1
        }
      },
      {
        "code": "mode",
        "mode": "rw",
        "type": "Enum",
        "property": {
          "range": [
            "dehumidify",
            "PURIFYING"
          ]
        }
      },
      {
        "code": "switch",
        "mode": "rw",
        "type": "Boolean",
        "property": {}
      }
    ]
  }
]

Detail Informations

Hello,

I am trying to add a Dehumidifier in Homekit using this plugin.

After utilizing deviceOverrides, the device is showing up in accessories, however only part of the functions is there.

{
    "name": "Tuya",
    "options": {
        "projectType": "2",
        "accessId": "XXX",
        "accessKey": "XXX",
        "countryCode": 30,
        "username": "XXX",
        "password": "XXX",
        "appSchema": "tuyaSmart",
        "deviceOverrides": [
            {
                "id": "XXX",
                "unbridged": false,
                "schema": [
                    {
                        "code": "indoor_humidity",
                        "newCode": "humidity_indoor"
                    }
                ]
            }
        ],
        "debug": true
    },
    "platform": "TuyaPlatform"
}

More specifically, I would like to be able to set the mode of the device (dehumidify/purify) and also the humidity level (35-80%). Humidity sensor is exposed, can we do the same for temperature sensor as well (so that we can use it in automations)?

Right now there is only 1 accessory for the device. It lets me choose between "Dehumidify" and "Off", and when I click the gear (Settings icon), I can see the current humidity and set (with a slider) the fan speed.

Thanks,
Ilias

@ilikourou ilikourou added the enhancement New feature or request label Nov 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant