I got excited when i saw this working. however if i use switch: i get a startup error
2020-01-21 22:53:12 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for localtuya which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.
2020-01-21 22:53:14 ERROR (MainThread) [homeassistant.components.switch] Error while setting up platform localtuya
File "/config/custom_components/localtuya/switch.py", line 68, in setup_platform
File "/config/custom_components/localtuya/switch.py", line 129, in __init__
File "/config/custom_components/localtuya/switch.py", line 111, in status
File "/config/custom_components/localtuya/switch.py", line 87, in __get_status
File "/config/custom_components/localtuya/pytuya/__init__.py", line 311, in status
If i use light:, i get an error when trying to change its status as per @francisp
Thanks for replying but I ended up moving away from using Tuya local and started custom firmware flashing my plugs with Tuya-Convert as was suggested by many people on this forum. I flash them with tasmota and after I had done 1 I never looked back, I’ve done over 20 plugs, about 10 bulbs and a couple of LED controllers.
Thanks anyway
Take a look at https://github.com/TradeFace/tuyamqtt/ That might solve your problem. I be releasing v1.1 in a few days. TuyaFace ( the library to connect to the devices was released yesterday v1.3.1)
You have to get from the HACS STORE. Do you have it installed? If so it will be in the “integrations” and search for local tuya. After installation go to the settings, integration click plus icon in corner search for local tuya. It will scan all devices, when adding device make sure to force close smart life or tuya app on all devices. Just follow instructions for the github.
I’ve been trying to add my localtuya service to a 2nd ha server.
Using the same api keys and a device id on the list using the cli wizard, it will not return any local keys.
‘cannot fetch device. make sure id or account is correct’
Used the same keys for the wizard on my 1st ha server and still works fine.