Tuya Device Help

Thanks @idbaker, your comment about using one or the other method was a help as I was mixing a bit of old and new methods together.
I finally succeeded in setting up the plug using the old tuya method.
Steps were:

  1. Add the old tuya.py custom component to your custom_components/switch folder

  2. Find the device Id and localkey, important here is that localkey changes each time you add the plug to an app

  3. Add the switch using the below, host is IP address of the plug.

    switch:

    • platform: tuya
      host: 192.168.0.15
      local_key: “b32ab680603abxxxx”
      device_id: “77180230840d8e4cxxxx”
      switches:
      switch1:
      friendly_name: switch1
      id: 1

It is a bit flaky, I’m getting errors sometimes but other times it works great.