Typically you can walk up to one, click the button, and it'll switch states. But lately it switches states, and then SWITCHES BACK to the previous state! I've got it connected to my mqtt server running via hassio (Home Assistant). These are the settings (and I've verified that ALL the settings aside from Name and Unit nr are the same between my other plugs).
Code: Select all
on button#buttonstate do
if [relay#relaystate]=1
Delay 3000
gpio,15,0
publish /%sysname%/relay/relaystate,0
else
Delay 3000
gpio,15,1
publish /%sysname%/relay/relaystate,1
endif
endon
Does this mean the physical button is "bouncing" (I think I'm using the word correctly) - i.e. one push registers as two pushes? If that's the case, any way to smooth that out with code?
Build: 147
Core Version: 2_3_0
Thanks!