Need help Avatto Fan Light Switch - Model reference: FLS-02

Hello all. I want to buy the above mention Fan light switch. Has anybody use this model and successfully integrated in HA?

Also it has tasmota template given below:

{“NAME”:“AVATTO Smart Wifi Fan Light”,“GPIO”:[0,107,0,108,0,0,0,0,0,0,0,0,0],“FLAG”:0,“BASE”:54}

with backlog settings:

Backlog TuyaMCU 12,1; TuyaMCU 21,2; TuyaMCU 11,3; DimmerRange 0, 200

I have couple of questions.

1 - Has anybody integrate it with HA?
2 - How can I flash it with esphome?

1 Like

I’ve tried to use Tuya-Convert and was not possible. I tried soldering cables in the correct pins and I didn’t have success again. Maybe the problem is to put this device in Flash Mode but I am not sure.

After very HARD work I could flash TASMOTA on AVATTO FLS-02.
You need to soldering cables:
3,3v - VCC
GND - GND
TX - RX
RX - TX
GND - GPIO0
GND - RST PIN from the little MCU. There are 4 holes with “JP1” indicator in the circuit board. Just connect the GND in the first one from top to bottom. You can flash!

BUT, I have Tasmota working well but problems with the SWITCH. This Template from TASMOTE WEBSITE is not working well.
Just the FAN switch is working.
Fan Level and Ligh Switch are not!

I could put it to work!! FINALLY!!!

The Template you have is OK. It works!

Please see the following commands to apply in the Tasmota Console:

TuyaMCU 11,1; TuyaMCU 63,3; TuyaMCU 12,9;

Rule1
ON EVENT#3,0 DO Backlog Publish cmnd/%topic%/TuyaSend4 3,0; POWER1 ON endon
ON EVENT#3,2 DO Backlog Publish cmnd/%topic%/TuyaSend4 3,2; POWER1 ON endon
ON EVENT#3,4 DO Backlog Publish cmnd/%topic%/TuyaSend4 3,4; POWER1 ON endon

Rule2
ON TuyaReceived#Data=55AA03070005030400010016 DO Publish stat/%topic%/SPEED 3,0 endon
ON TuyaReceived#Data=55AA03070005030400010117 DO Publish stat/%topic%/SPEED 3,2 endon
ON TuyaReceived#Data=55AA03070005030400010218 DO Publish stat/%topic%/SPEED 3,2 endon
ON TuyaReceived#Data=55AA03070005030400010319 DO Publish stat/%topic%/SPEED 3,2 endon
ON TuyaReceived#Data=55AA0307000503040001041A DO Publish stat/%topic%/SPEED 3,4 endon

Rule1 ON
Rule2 ON

At Home Assistant:

fan:

  • platform: mqtt
    name: “MQTT Switch Wall Fan 1”
    qos: 0
    state_topic: “stat/switchwall/fanlight1/POWER1”
    command_topic: “cmnd/switchwall/fanlight1/POWER1”
    speed_state_topic: “stat/switchwall/fanlight1/SPEED”
    speed_command_topic: “cmnd/switchwall/fanlight1/EVENT”
    payload_on: ‘ON’
    payload_off: ‘OFF’
    payload_low_speed: ‘3,0’
    payload_medium_speed: ‘3,2’
    payload_high_speed: ‘3,4’
    availability_topic: tele/switchwall/fanlight1/LWT
    payload_available: Online
    payload_not_available: Offline
    speeds:
    • low
    • medium
    • high

light:

  • platform: mqtt
    name: “MQTT Switch Wall Fan Light 1”
    qos: 1
    state_topic: “stat/switchwall/fanlight1/POWER2”
    command_topic: “cmnd/switchwall/fanlight1/POWER2”
    payload_on: “ON”
    payload_off: “OFF”
    availability_topic: “tele/switchwall/fanlight1/LWT”
    payload_available: “Online”
    payload_not_available: “Offline”

LOVELACE UI:
I am using a custom FrontEnd called fan-control-entity-row, that you can find on HACS

type: entities
title: Fans
show_header_toggle: false
entities:

  • entity: fan.mqtt_switch_wall_fan_1
    type: ‘custom:fan-control-entity-row’
    name: Bedroom
    customTheme: false
1 Like

I have the same module, the light and the fan aren’t sync with the HA. so if i turn on the light from the wall switch in HA the state still show OFF.
i can’t figure the issue …

Hi there! was facing same issue here, to “fix” make sure that the slider in Tasmota is not placed on the initial position, because it’s affecting “Toggle 2” which is the light and not the Fan.

I belive something is wrong with the template, because the “dimmer function” should affect Toggle 1 which is the Fan speed.

Thinking about buying a ceiling fan… Has anyone been able to make this work properly?

Hello guys!

Does anybody had success to make it works? In my case the light doesn’t works. Seems to me that TuyaMCU Command is not properly mapped…
I’m able to turn on and off on the wall, but if try to do it on the from Tasmota Web page toggle it doesn’t works.

Thank you,

So, the new HA fan configuration make it impossible to make it work…
Who managed to get the fan to work properly with the new settings and can share with us as well?

Well, after a lot of testing and settings I got (it seems to me) to the point that the Switch Avatto FLS-02 works well with HA. So here are the settings:

Tasmota console:

Backlog TuyaMCU 11,1; TuyaMCU 63,3; TuyaMCU 81,7; TuyaMCU 12,9;

Rule1
ON TuyaReceived#Data=55AA03070005030400010016 DO Backlog Publish stat/%topic%/SPEED low;  POWER1 endon
ON TuyaReceived#Data=55AA03070005030400010117 DO Backlog Publish stat/%topic%/SPEED low; POWER1 endon
ON TuyaReceived#Data=55AA03070005030400010218 DO Backlog Publish stat/%topic%/SPEED medium;  POWER1 endon
ON TuyaReceived#Data=55AA03070005030400010319 DO Backlog Publish stat/%topic%/SPEED medium;  POWER1 endon
ON TuyaReceived#Data=55AA0307000503040001041A DO Backlog Publish stat/%topic%/SPEED high;  POWER1 endon

Homeassistant Fan yaml :

- platform: mqtt
  name: "Fan"
  command_topic: "cmnd/%topic%/POWER1"
  state_topic: "stat/%topic%/POWER1"
  availability_topic: "tele/%topic%/LWT"
  payload_off: "OFF"
  payload_on: "ON"
  payload_available: "Online"
  payload_not_available: "Offline"
  preset_modes:
    - 'low'
    - 'medium'
    - 'high'
  preset_mode_command_topic: "cmnd/%topic%/Backlog"
  preset_mode_command_template: >
    {% if value == 'low' %}
      TuyaSend4 3,0; Power1 1
    {% elif value == 'medium' %}
      TuyaSend4 3,2; Power1 1
    {% elif value == 'high' %}
      TuyaSend4 3,4; Power1 1
    {% endif %}
  preset_mode_state_topic: "stat/%topic%/SPEED"

Obviously you need to change% topic% to real topic.

Hope this helps someone

is it possible on this device changing the tuya wifi module for an ESP-12F?

I have mine but the tuya TYWE2S module is dead, just works physically