i have some Wallmount Push-Buttons, which turn to Ground on push.
When i use a binary sensor with the following configuration, i receive OFF/ON-Triggers even if the buttons are not pushed. Sometimes more, sometimes less:
I thought that “invert” simply inverts the signal - but it looks to me, as that there is some “magic” happening here.
Otherwise i don’t understand, why i get “ghost-triggers” without “invert”. Should not the pullup in combination with the “debounce”-Statements be sufficient to get a stable binary status?
Last year, I too had a case of ghost triggers with a Sonoff Touch. I tried everything on the software side and nothing gave satisfactory results. In the end, I changed the hardware to a DIY touch switch and I never had ghost switching. What you can do is add a capacitor to filter out noise.
Hmm, i took a look at the corresponding Source-Code. “invert” indeed does a simple !value, so no special treatment that would prevent “ghost”-Push-button-bouncing.
Any other ideas, why a binary sensor with activated Pullup and no “invert”-usage does “ghost”-triggering?
I used the same push-buttons on Atmel-ATMega32 before without any problems.
i’ve found the problem: It was not an esphome-fault. I had some weird electromagnetic-interferences which caused big trouble on the binary-inputs. The wires to the push-buttons are about 10m long (CAT5) an seemed to work like an antenna.
I disabled the internal pushup and used a 1k external Pullup: Problems gone for all 8 push-buttons.