@sparkydave and others with the brilliant fan switches.
Ive managed to get a similar one from SRL-tech working (https://srltech.com.au/portfolio_page/fan-series/), Id be fairly certain the Brilliant one is the same, I might try and flash one of mine later to confirm.
In any case, you will need to be running Tasmota 7.0.0.1 or later, I flashed latest dev myself.
Configure module as a TuyaMCU, the dimmer and light functionality should be the same as the configs posted above but the fan speed is where it gets a little more tricky.
Go to console and type weblog 4 and then view the output after hitting buttons on the RF remote, it should look something like
11:50:26 {"TuyaReceived":{"Data":"55AA00070005020400010012","Cmnd":7,"CmndData":"0204000100","DpId":2,"DpIdType":4,"DpIdData":"00"}}
11:49:27 {"TuyaReceived":{"Data":"55AA00070005020400010113","Cmnd":7,"CmndData":"0204000101","DpId":2,"DpIdType":4,"DpIdData":"01"}}
11:49:28 {"TuyaReceived":{"Data":"55AA00070005020400010214","Cmnd":7,"CmndData":"0204000102","DpId":2,"DpIdType":4,"DpIdData":"02"}}
11:49:29 {"TuyaReceived":{"Data":"55AA00070005020400010315","Cmnd":7,"CmndData":"0204000103","DpId":2,"DpIdType":4,"DpIdData":"03"}}
11:49:29 {"TuyaReceived":{"Data":"55AA00070005020400010416","Cmnd":7,"CmndData":"0204000104","DpId":2,"DpIdType":4,"DpIdData":"04"}}
11:49:30 {"TuyaReceived":{"Data":"55AA00070005020400010517","Cmnd":7,"CmndData":"0204000105","DpId":2,"DpIdType":4,"DpIdData":"05"}}
This was the result of me going from the lowest to highest fan speed setting (this switch supports 6 speeds).
In the lastest development version they have added a TuyaSend command and TuyaReceived event which you do use in rules.
You will want a rule something like this, where you replace the Data with the values you received in console and potentially customise the MQTT topic you want to post the result to
Rule1 on TuyaReceived#Data=55AA00070005020400010012 DO publish2 stat/Event/speed 1 endon on TuyaReceived#Data=55AA00070005020400010113 DO publish2 stat/Event/speed 2 endon on TuyaReceived#Data=55AA00070005020400010214 DO publish2 stat/Event/speed 3 endon on TuyaReceived#Data=55AA00070005020400010315 DO publish2 stat/Event/speed 4 endon on TuyaReceived#Data=55AA00070005020400010416 DO publish2 stat/Event/speed 5 endon on TuyaReceived#Data=55AA00070005020400010517 DO publish2 stat/Event/speed 6 endon
This will only post the updated status to the topic we still need to have a way to set the current speed. This is achieved by
Rule2 on Event#1 DO TuyaSend4 2, 0 endon on Event#2 DO TuyaSend4 2, 1 endon on Event#3 DO TuyaSend4 2, 22 endon on Event#4 DO TuyaSend4 2, 3 endon on Event#5 DO TuyaSend4 2, 4 endon on Event#6 DO TuyaSend4 2, 5 endon
This will result in sending the correct command to the TuyaMCU when a message is posted to cmnd/sonoff/Event with the corresponding fan speed of 1-6.
To determine the correct values look again at the console output
{"Data":"55AA00070005020400010517","Cmnd":7,"CmndData":"0204000105","DpId":2,"DpIdType":4,"DpIdData":"05"}
DpId is 2
Enum value is 5
DpIdType 4 is enum so use TuyaSend4 to send an enum
Dont forget to enable the rules after setting them with
Rule1 ON
and
Rule2 ON
Hope this helps.