I have attempted adding my first LocalTuya device. The RGB light device was found and the Local Key worked. I then got to the addition of entities. The DPIds available were 20 through to 26.
I found the following list of DPIDs for Tuya lights and progressed through associating each of these devices in line with the DPIDs available:
Should every entity be added as a type of device domain of “light”, even if it acts like another type (such as Switch which is basically an on/off action)? I did add the DPID for switch as a Switch.
I really was unsure about Mode and added this as a number, as I was fooled by the enum type. How should this have been added and what selected as an attribute?
Is there any way of deleting an entity in LocalTuya so that I can then re-add it correctly? It appears to me that I have to delete the whole device if I make a mistake with the entity domain type. If it can be done away from the UI, I am happy to edit whatever files support this.
Once added, icon changes within the HA entity appeared to make no difference e.g. changing a light icon to palette, for the colour DP, made no difference and it was still a lightbulb icon.
If anyone has examples of how they have set up DPIDs 20-26 for a light, I would be grateful to know.
However, my attempt is still behaving strangely. I have added a basic switch and 6 sensors for my light (switch/work mode/brightness/colour temp/colour data/scene data/countdown). These were all picked up from scanning for the device.
I expected to be able to do 2 things:
For my added entities above, change these to meaningful values, including setting max/mins for brightness. However in Edit, I get the following window, which looks nothing like the windows I see in How To videos online. They all seem to have a number of fields representing colour temperatures/brightness/etc.
I was also under the impression that I could add entities by adding another LocalTuya integration and selecting the light just added. What actually happens is I have to enter the api details a second time, I get a “Failed to retrieve a Device List” message, The only way it does is if I tick the “Do not configure Cloud API account” and that reconfigure Tuya entirely, removing the device I have added previously. I have clearly not set this up correctly but have no idea what I have missed. Tuya IOT platform seems ok but I am sure I must have messed up somewhere.
With the way things are working for me now, I can only have one LocalTuya device and that is really only partially added as entities are not complete.