Recently I’ve been setting up Home Assistant dashboard with TileBoard and wanted to control the Grid Connect fan switches through the interface. After a lot of looking and trial and error, I found a reliable way to get these switches working locally through Local Tuya. I am not going to go over how to install HA or Local Tuya there are already enough guides on that. I am just hoping this can save someone else hours of tinkering.

I’m assuming that…

  1. You already have Home Assistant setup and working. 
  2. You have added the Fan controller to the Tuya App.
  3. You have HACS installed.
  4. You have signed up for a Free Tuya developer account and have got the “local” code.
  5. You have installed Local Tuya

Link and Guides

Code for the Fan Controller

Now instead of adding the device through the home assistant GUI, we need to add the code for the fan controller to the configurations.yaml.

  1. Using file editor or VS Code open the configurations.yaml file
  2. add the following code to the bottom. Replace the <> fields with your settings.

  - host: <IP Address of Fan Controller>
    device_id: <Device ID>
    local_key: <Local Key>
    friendly_name: Fan Controller Local
    protocol_version: "3.3"
      - platform: switch
        friendly_name: Light
        id: 9
      - platform: fan
        friendly_name: Fan
        fan_speed_control: 3
        fan_speed_low: "1"
        fan_speed_medium: "2"
        fan_speed_high: "3"
        id: 1
  1. Go to Configuration -> Server Controls. Select Check Configuration to ensure the code you added is correct.
  2. Restart the Server.
  3. Your Fan controller should then show up under devices. You will be able to control the light and fan speed.