If someone can understand better than me, which is really not difficult Here are some data I collected by switching the diffuser on using physical button, pressing again the physical button to put it into high mist strength then press a third and last time to switch it off.
18:05:16.964 {"TuyaReceived":{"Data":"55AA010700050C050001001E","Cmnd":7,"CmndData":"0C05000100","DpType5Id12":"0x00","12":{"DpId":12,"DpIdType":5,"DpIdData":"00"}}}
18:05:16.979 TYA: fnId=0 is set for dpId=12
18:05:16.984 {"TuyaReceived":{"Data":"55AA01070005670400010078","Cmnd":7,"CmndData":"6704000100","DpType4Id103":0,"103":{"DpId":103,"DpIdType":4,"DpIdData":"00"}}}
18:05:16.992 TYA: fnId=61 is set for dpId=103
18:05:16.995 SRC: Switch
18:05:16.998 CMD: Group 0, Index 1, Command "TUYAENUM", Data "0"
18:05:17.001 MQT: stat/diffuseur_bureau/RESULT = {"TuyaEnum1":0}
18:05:17.011 {"TuyaReceived":{"Data":"55AA01070005010100010110","Cmnd":7,"CmndData":"0101000101","DpType1Id1":1,"1":{"DpId":1,"DpIdType":1,"DpIdData":"01"}}}
18:05:17.020 TYA: fnId=11 is set for dpId=1
18:05:17.022 TYA: RX Relay-1 --> MCU State: On Current State:Off
18:05:17.024 SRC: Switch
18:05:17.030 MQT: stat/diffuseur_bureau/RESULT = {"POWER1":"ON"}
18:05:17.035 MQT: stat/diffuseur_bureau/POWER1 = ON
18:05:17.555 CFG: Saved to flash at F5, Count 23, Bytes 4096
18:05:21.181 TYA: Send "55aa00000000ff"
18:05:21.190 {"TuyaReceived":{"Data":"55AA010000010102","Cmnd":0,"CmndData":"01"}}
18:05:21.199 TYA: Heartbeat
18:05:21.588 {"TuyaReceived":{"Data":"55AA010700050C050001001E","Cmnd":7,"CmndData":"0C05000100","DpType5Id12":"0x00","12":{"DpId":12,"DpIdType":5,"DpIdData":"00"}}}
18:05:21.598 TYA: fnId=0 is set for dpId=12
18:05:21.602 {"TuyaReceived":{"Data":"55AA01070005670400010179","Cmnd":7,"CmndData":"6704000101","DpType4Id103":1,"103":{"DpId":103,"DpIdType":4,"DpIdData":"01"}}}
18:05:21.610 TYA: fnId=61 is set for dpId=103
18:05:21.613 SRC: Switch
18:05:21.616 CMD: Group 0, Index 1, Command "TUYAENUM", Data "1"
18:05:21.623 MQT: stat/diffuseur_bureau/RESULT = {"TuyaEnum1":1}
18:05:21.635 {"TuyaReceived":{"Data":"55AA01070005010100010110","Cmnd":7,"CmndData":"0101000101","DpType1Id1":1,"1":{"DpId":1,"DpIdType":1,"DpIdData":"01"}}}
18:05:21.646 TYA: fnId=11 is set for dpId=1
18:05:21.648 TYA: RX Relay-1 --> MCU State: On Current State:On
18:05:25.240 {"TuyaReceived":{"Data":"55AA0107000567040001027A","Cmnd":7,"CmndData":"6704000102","DpType4Id103":2,"103":{"DpId":103,"DpIdType":4,"DpIdData":"02"}}}
18:05:25.249 TYA: fnId=61 is set for dpId=103
18:05:25.252 SRC: Switch
18:05:25.255 CMD: Group 0, Index 1, Command "TUYAENUM", Data "2"
18:05:25.265 MQT: stat/diffuseur_bureau/RESULT = {"Command":"Error"}
18:05:25.277 {"TuyaReceived":{"Data":"55AA0107000501010001000F","Cmnd":7,"CmndData":"0101000100","DpType1Id1":0,"1":{"DpId":1,"DpIdType":1,"DpIdData":"00"}}}
18:05:25.287 TYA: fnId=11 is set for dpId=1
18:05:25.289 TYA: RX Relay-1 --> MCU State: Off Current State:On
18:05:25.292 SRC: Switch
18:05:25.298 MQT: stat/diffuseur_bureau/RESULT = {"POWER1":"OFF"}
18:05:25.303 MQT: stat/diffuseur_bureau/POWER1 = OFF
Blakadder answered there are more than two values, which I don’t notice/understand so I prefer hopping someone will understand all of these data which are worst than an entire week of mathematical lesons without sleep for me…
The last GD-W32 template looks better, less switches for things which are dimmers.
Next episode:
I continued to search for this Tasmota 9.X template and I have no error if I replace tuyaenum1 1
to tuyaenum1 2
but physical button state is not synchronized, only tTuyaEnum1 which is set to 0 for low speed, 1 for high and 2 when the diffuser is off when using the physical button.
DPID1 is not updated at all.
@Sir_Goodenough except if I have miss-understood something, this template give the ability to have the mode you mentioned for lights but maybe you already seen it.