Tuya dimmer - Tasmota rules questions

Using some CE Smart tuya based dimmers…can’t figure out if it me or the switch. It does not run rules based on the Power#state…see below works if I use Dimmer#state…

rule1 on POWER#State do publish cmnd/cesmart0002/power toggle endon

02:56:37 CMD: rule1 on POWER#State do publish cmnd/cesmart0002/power toggle endon
02:56:37 MQT: stat/cesmart0003/RESULT = {“Rule1”:“ON”,“Once”:“OFF”,“StopOnError”:“OFF”,“Free”:450,“Rules”:“on POWER#State do publish cmnd/cesmart0002/power toggle endon”}
02:56:41 CMD: power on
02:56:41 MQT: stat/cesmart0003/RESULT = {“POWER”:“ON”}
02:56:41 MQT: stat/cesmart0003/POWER = ON
02:56:47 CMD: power off
02:56:47 MQT: stat/cesmart0003/RESULT = {“POWER”:“OFF”}
02:56:47 MQT: stat/cesmart0003/POWER = OFF.

rule1 on dimmer#State do publish cmnd/cesmart0002/power toggle endon

02:56:18 CMD: rule1 on dimmer#State do publish cmnd/cesmart0002/power toggle endon
02:56:18 MQT: stat/cesmart0003/RESULT = {“Rule1”:“ON”,“Once”:“OFF”,“StopOnError”:“OFF”,“Free”:449,“Rules”:“on dimmer#State do publish cmnd/cesmart0002/power toggle endon”}
02:56:22 CMD: dimmer 21
02:56:22 MQT: stat/cesmart0003/RESULT = {“POWER”:“ON”,“Dimmer”:21}
02:56:23 RUL: DIMMER#STATE performs “publish cmnd/cesmart0002/power toggle”
02:56:23 MQT: cmnd/cesmart0002/power = toggle
02:56:26 CMD: dimmer 22
02:56:26 MQT: stat/cesmart0003/RESULT = {“POWER”:“ON”,“Dimmer”:22}
02:56:26 RUL: DIMMER#STATE performs “publish cmnd/cesmart0002/power toggle”
02:56:26 MQT: cmnd/cesmart0002/power = toggle

any thoughts??

So a bit of an update - case anyone runs into this…got this working by using DigiBlur’s version 3 and 4 of his dimmer code.

Also make sure you use POWER1#State not POWER#State

https://github.com/digiblur/Sonoff-Tasmota/blob/development/bins/Tasmota_6.4.1.19(digiDIMv4).bin