I’ve got a number of switches and just bought 2 lights by tuya. Everything works but fine on HA except for one light that is recognized as a switch. It looks and works identically to the other light in the smart life (tuya) app.
So i want to know if the problem is with the api call to their server on discovery of if HA is messing up in parsing the response. I’ve done my best to look at the raw comms but i don’t think it’s the raw comms as it has a homeassistant field added to it (ha_type).
This is what the light that is recognized as a light looks like in the response…
'data': {
'brightness': '25',
'color_mode': 'colour',
'online': False,
'state': 'true',
'color_temp': 1671
},
'name': 'Smart Bulb',
'icon': 'https://images.tuyaus.com/smart/product_icon/dj.png',
'id': '800061668caab5007512',
'dev_type': 'light',
'ha_type': 'light'
}, {
'data': {
'online': True,
'state': True
},
and the light that is not recognized properly…
'data': {
'online': True,
'state': False
},
'name': 'Smart Bulb',
'icon': 'https://images.tuyaus.com/smart/product_icon/dj.png',
'id': '24887008d8bfc0dae643',
'dev_type': 'switch',
'ha_type': 'switch'
}],
How do i get to the raw comms and see where the light is being set to a swtich in HA if that’s the case?
Any other advice on how to debug this would be great.
Thanks!
Reza