Apiele 19mm LED Momentary Contact Switch LED control from 12V

Guys and Girls,

So I am converting a van.

I came across amazing Apiele Momentary 12v LED Switches. The LED is independently wired. It will light off 3.3v, but it looks amazing at native 12v. The switch has a built-in resistor. So please see a simple schematic that allows 12v to power the LED, with GPIO control from an ESP32. I used PIN 26, but of course at your discretion. The importance is that ground is shared. Hope this helps anyone. I am very new at this, but super excited to share my breadboard experience!

Good! Little steps.
Are you also going to connect the switch to your ESP32 via a resistor to a GPIO port and use the relay board to actually switch the device via automation, or are you going to leave that till later?

Exactly!!! Using the YAML code pull up resistor in ESP32. I tried it on the breadboard and works beautifully! I am using automation to trigger a 30amp relay on an ESP12F, 4 relay board. This runs ESP8266. What a pain to reflash YAML on that board, required grounding GPIOo and GND.

Thank you for following! The beauty of these switches is their indicator light status. You can trigger let’s say water pump from the glass panel, and the LED will illuminate and vice versa. I used a binary sensor command, with automation to capture one change status, from off to on, and a toggle switch.