milo526 / homebridge-tuya-web

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

2 switchs is not supported (only one switch is visible) #393

Closed jmcollin78 closed 2 years ago

jmcollin78 commented 2 years ago

Device type Double switch device: Loratap

Device information

Getting credentials
Got credentials
{   'access_token': 'xxxx',
    'expires_in': 864000,
    'refresh_token': 'xxxx',
    'token_type': 'bearer'}
Getting devices
Got devices
{   'header': {'code': 'SUCCESS', 'payloadVersion': 1},
    'payload': {   'devices': [   {   'data': {'online': True, 'state': False},
                                      'dev_type': 'switch',
                                      'ha_type': 'switch',
                                      'icon': 'https://images.tuyaeu.com/smart/solution/137001/63ef34c2da0d9955_cover.png',
                                      'id': 'bfc55496803c3c235f7uqo',
                                      'name': 'Lumières cuisine'},
                                  ],
                   'scenes': []}}
!!! NOW REMOVE THIS FILE, SO YOUR CREDENTIALS (username, password) WON'T LEAK !!!

This is a double switch device. And only one switch is visible on Homebridge.

jmcollin78 commented 2 years ago

If you gave me some guideline, maybe I will be able to develop myself an evolution for this feature

milo526 commented 2 years ago

Hello, Please move to use a different API if this is a requirement for you. The Tuya homeassistant API that this plugin uses is not compatible with multiple switches in one device.

For example you might want to take a look at the first party plugin created by Tuya themselves.

jmcollin78 commented 2 years ago

Many thank for this quick and valuable answer. I will have a look at this Tuya plugin