I've installed the release 120 in a Sonoff ESP https://www.itead.cc/sonoff-wifi-wireless-switch.html.
In this device we have a relay and a monostable switch (NO).
I want to write a rule to activate the relay when i push the button, and desactivate it when i push again the button.
It is possible to add in a rule a if with a "GPIO" directly ???
Something like this :
Code: Select all
on Bouton_ESP#Switch do
if [GPIO-0]=0
gpio,12,0
else
gpio,12,1
endif
endon
JC