milo526 / homebridge-tuya-web

Hoobs and Homebridge plugin for Tuya devices using Home Assistant Tuya Web Api
MIT License
218 stars 93 forks source link

Tuya wont add new devices #411

Closed randompea closed 2 years ago

randompea commented 2 years ago

Describe the bug Added new devices to my tuya set up and i get this ""Tried overwriting device config for "Upstairs Thermostat" which is not a valid device-id or device name."

Steps To Reproduce

  1. Go to plugin settings, dont do anything on tuya
  2. Click on add new device
  3. Put in credentials
  4. Restart and check logs

    Homebridge Config

       {
                "name": "TuyaWebPlatform",
                "options": {
                    "username": "REDACTED",
                    "password": "REDACTED",
                    "countryCode": "1",
                    "platform": "tuya"
                },
                "defaults": [
                    {
                        "id": "Dining room lights",
                        "device_type": "light",
                        "min_brightness": "0",
                        "max_brightness": "100",
                        "min_kelvin": "1",
                        "max_kelvin": "100",
                        "light_characteristics": [
                            "Brightness",
                            "Color"
                        ]
                    },
                    {
                        "id": "Master bedroom lights",
                        "device_type": "light",
                        "min_brightness": "0",
                        "max_brightness": "100",
                        "min_kelvin": "1",
                        "max_kelvin": "100",
                        "light_characteristics": [
                            "Brightness",
                            "Color"
                        ]
                    },
                    {
                        "id": "Family Room Lights",
                        "device_type": "light",
                        "min_brightness": "0",
                        "max_brightness": "100",
                        "min_kelvin": "1",
                        "max_kelvin": "100",
                        "light_characteristics": [
                            "Brightness",
                            "Color"
                        ]
                    },
                    {
                        "id": "Upstairs Light",
                        "device_type": "light",
                        "min_brightness": "0",
                        "max_brightness": "100",
                        "min_kelvin": "1",
                        "max_kelvin": "100",
                        "light_characteristics": [
                            "Brightness",
                            "Color"
                        ]
                    },
                    {
                        "id": "Upstairs Thermostat",
                        "device_type": "climate",
                        "min_temper": "40",
                        "max_temper": "98"
                    },
                    {
                        "id": "Kids room",
                        "device_type": "light",
                        "min_brightness": "0",
                        "max_brightness": "100",
                        "light_characteristics": [
                            "Brightness",
                            "Color"
                        ]
                    },
                    {
                        "id": "Grandparents room",
                        "device_type": "light",
                        "min_brightness": "0",
                        "max_brightness": "100",
                        "light_characteristics": [
                            "Brightness",
                            "Color"
                        ]
                    }
                ],
                "scenes": false,
                "platform": "TuyaWebPlatform"
     }

    Device Config

    Additional Context

    Some context is these bulbs and the thermostat have a custom ui when you open it. The bulbs are Smart Light Bulb 5301's and the thermostat is a SL2 thermostat