Closed TheJulianJES closed 5 years ago
I can't replicate this behavior. For me, the pin is low on boot-up as expected :(
Mhm. That's weird. I just rebuilt it (https://www.arduino.cc/en/Tutorial/Button was what I used in the original build and rebuilt now) and it still happens for some reason. (On a NodeMCU though, esp8266). It only happens when using on_click (like in my posted esphomeyaml config), but not when using on_press. The button is connected on one side to D2 and also to a 10k resistor between ground. The other side is connected to 3.3V. (Like in the picture on the arduino website).
Closing this issue as it looks a lot like a hardware issue to me. Please reopen if you can give me a config/setup with which this issue can be reproduced
Seems to be fixed by #425
When there's a button hooked up with a 10k pulldown resistor (to ground) and having 3.3v to the data pin D2 on the NodeMCUv2 (esp8266) when the button is switched on, it turns the light on//off as expected, but for some reason at boot (not reboot, maybe state saves there?) the buttons seems to be pressed (thus turning on the light). Although this can be solved by using a filter, like I did below.
Not sure if this is an issue, but I expect that other people will also experience this.
(Note: I'm pretty sure the on_press function was not affected when I tried)
(And I also could have used an internal pullup, but the build already existed and it's hard to change it now.)
Relevant esphomeyaml config entry: