Hopefully, you can help. I’m running HA in a Docker container on a Synology and I’m trying to get HA to recognise 2 Medion Power Switches I have connected. The Power switches are working with the TuyaSmart app on Andriod.
As per the docs https://www.home-assistant.io/components/tuya/ I’ve added the following to configuration.yaml:
But no luck getting it working. Nothing appears in the logs indicating anything is wrong. Do I need local_key and device_id as indicated in early posts in the community forum?
Thanks in advance
Hi walaj, Yes I have restarted since addingconfig, I’ve also added “platform: tuya” to configuration yaml, still no luck. Yes HA has working Internal IP address, and yes a heap of other stuff works fine.
I recently setup tuya for a single gosund plug. I noticed country_code you have as a number. I have mine setup as the two letter country code (country_code: US in my case.) I have a feeling it’s not that simple, but worth a shot. I also have “platform: smart_life” that might be something to look into also. Not sure if there’s a tuya_smart platform.
Unfortunately, I’m not - I’m running a bunch of Chinese lights switches that I installed. However, they were all auto-discovered with no additional action on my part.
but that raises an interesting point - are the devices supported by the tuya integration - I know the WIFI motion sensors that they make are not.
I just got the smart socket and start with tuya for home assistant. Works just fine. Once config complete check your config and restart your Ha. This will be automatically discover devices that link to your account.
The device found 1 of my device as switch.40086100dc4f22e5d6a4
This is quite hard to find but it will be in your entity_id.
If you think that it didn’t discover all of your devices from tuya. Then go service and do the tuya.pull_devices
tuya:
username: !secret tuya_user
password: !secret tuya_passwd
country_code: 66
platform: smart_life <== put in here the app you use to pull the devices in that app
platform (string)(Optional)The app where your account register. `tuya` for Tuya Smart, `smart_life` for Smart Life, `jinvoo_smart` for Jinvoo Smart.
Default value: tuya
I successfully added my two Jinvoo Wifi “smart” sockets yesterday. Indeed it is hard to identify the new switches by their cryptic names. Initially I searched for “tuya” in the entities list and thought the component did not load properly.
Finally a working integration for this kind of device without the need to flash an alternative firmware.
Blockquote
after restarting HA, i can see tuya pull and update service in Developer tool “dev-service”. but i dont know what to do next.
I am able to connect smart plug with smartlife app as expected, but dont know end to end steps to control through HA.
When you add tuya component to home assistant. The switch.xxxxxxxxxxx will be automatically create by ha. You can check the name of the switch from developer tools> states> search for new switch which the name will be a little long and wierd.
Then make it as a group if you have many tuya devices. make the group just created to show in frontend so you can turn on-off devices.
Here is example.
### Connect to Smart Life Acc ##
tuya:
username: !secret tuya_user
password: !secret tuya_passwd
country_code: 66
platform: smart_life
## Group ##
group:
bedroom_1_appliances:
name: Bedroom 1 Appliances
entities:
- switch.40086100dc4f22e5d6a4
Hi,
Thanks for quick reply, but I cannot see/find anything related to switch id. there is only 3 entry “persistent_notification.notification” , sun and yr.
Blockquote
above is the sample of my configuration.yaml file. I had checked in home-assistant.log… no error found.
I tried tuya.pull_devices also… even after that, no entity is visible in developer tools > state
please share sample of all steps that is required to add tuya (smart life) device added and checked