Tasmota Rules: help on publish switch state not working

The following is my config, and I’m not able to publish message on change state of GPIO12 and GPIO13…
This is my rule…

on Switch1#state=1 do
publish stat/%topic%/SWITCH1 ON
endon
on Switch1#state=0 do
publish stat/%topic%/SWITCH1 OFF
endon

Senza titolo

I’ve tried also with Switch7 or Switch8 but with no luck … where I’m wrong?

Rule1 on Switch1#state=1 do publish stat/%topic%/SWITCH1 ON endon on Switch1#state=0 do publish stat/%topic%/SWITCH1 OFF endon

You would need Switch7 or Switch8 I think.
That looks ok to me otherwise. Did you turn the rule on?

rule1 1

Yep, the rules is enabled

Did you end up getting this working?

Probably get an answer there if not. tas discord rules

No, it’s still not working… how to debug? it’s possibile to show the input status in some way?