I’ve recently got into using ESPHome but I’m really struggling with a simple capacitive switch to turn off a neopixel led. I have a ESP8266 Mini and one of the red TTP223 capacitive touch sensors but no matter what I add to the code, I can’t get the touch sensor to turn off the light when pressed.
I’ve tested all the components and they appear to be working so I do think it’s on the code side. Below is a copy of the code I have added (I’ve played around with it alot so it probably makes no sense what so ever now!:
Im aware I could use home assistant to map the button and the lights but I’d rather do a simple command on the board to take some load off of Home Assistant.
I have tried different pins on the board also but unfortunately this makes no difference. When I used the “Switch” instead of binary sensor, the LED on TTP223 would flash when the button was touched but it wouldn’t register anything within the logs.
Thanks Daryl, Unfortunately it’s a no go. In the logs it doesn’t even register that the button has been pressed? It shows the light has been turned on and off if I turn off light in the weconsole
Please don’t post your code and logs as image. Do copy-paste using code tags.
For testing purpose use: on_state:
instead of click/press.
Also, don’t use quotations for id
I will be using a home assistant automation to turn it on to the various colours. Im not sure whether I need to set the colours I want to use on the esp code though or whether I can fully do it via home assistant?