iRayanKhan / homebridge-tuya

A Homebridge plugin to control Tuya devices locally.
MIT License
390 stars 164 forks source link

New Device: Ceiling fan with separate white and yellow controls #330

Open tdiggity opened 2 years ago

tdiggity commented 2 years ago

Describe your device Carro Ceiling Fan

Example: Generic Brand Lightbulb with Hex Color support, and 255 brightness.

Partial Support? Using defaults, the yellow_led can be controlled. Fan speed works, too.

This is my configuration:

{
    "type": "Fanlight",
    "name": "Ceiling Fan ",
    "id": "x",
    "key": "x",
    "manufacturer": "Carro",
    "model": "Smart WiFi Fan Switch",
    "useBrightness": "True",
    "maxSpeed": 10
},

Device Schema light = yellow leds white_led = white leds

light and white_led are separately tunable in brightness.

bright_value    Integer 
{
  "min": 10,
  "max": 1000,
  "scale": 0,
  "step": 1
}
light   Boolean 
"{true,false}"
fan_speed   Enum    
{
  "range": [
    "1",
    "2",
    "3",
    "4",
    "5",
    "6",
    "7",
    "8",
    "9",
    "10"
  ]
}
switch  Boolean 
"{true,false}"
switch_led  Boolean 
"{true,false}"
bright_value_1  Integer 
{
  "min": 10,
  "max": 1000,
  "scale": 0,
  "step": 1
}

Additional context Add any other context about the problem here.

tdiggity commented 2 years ago

[Tuya] SimpleFanLight changed: {"1":false,"2":"normal","3":"5","6":"0","7":0,"9":false,"10":1000,"101":true,"102":400,"103":"forward"}

key 9 = yellow_light, value = brightness key 101 = white_led, value = brightness