ESPHome Setup

How difficult could making a simple momentary ground switch be? 6 hours later and absolutely no progress is not the best sign. All I would like to know is how to program a simple microcontroller (Pi Pico W) to act a simple switch. I’ve tried every guide available from ESPHome, and I’m about to give up entirely! How complicated does it need to be!!! Help would be greatly appreciated!!!

Post your yaml code.
What do you want the switch to do?

Help doing what though? Installing ESPHome? Writing yaml? Flashing a device?

So you want it to control a relay or similar? Your post is extremely vague.

I have to agree with the others.
Please share your yaml configuration, and also as detailed as possible, what exactly you want to do.

  • What should be controlled?
  • How does your current setup looks like?
  • what exactly is not working with your current configuration / setup?

Sorry for the incredibly vague question, I was incredibly frustrated at the time I wrote it. I am trying to bridge 2 contacts on a switch with my pico. I was hoping to attach one wire to ground, and the other gpio pin was supposed to be a momentary ground switch. It isn’t a relay, just trying to activate a garage door by connecting two terminals via a esphome switch. Here is the end of my .yaml. Everything else is the prewritten code from esphome.

I’m essentially trying to use it as a physical switch activating a relay. It can be floating or high normally, it just needs to be ground when I activate the switch from HA. This code does run error free on my pico, and it appears in HA, toggle switch and all, but it doesn’t ground pin 7 when I flip the switch

SCHEMATIC!

Show us how you have connected the switch and relay to the pico.

This is more or less what I’m trying to accomplish, by bridging (no) to (com).

That’s not how the pins of a Pico / ESP board work. They don’t link pins together. What they do (in the case of an output) is provide a high or low level, 3.3v or 0v. That then needs to control a relay.

Your image also makes no sense since you have shown the relay contact going via a switch to the Pico pins yet you are saying you want to control a garage door.

What you need is to turn that relay board around so the Pico’s output pin is wired to the ‘in’ pin header. You also wire 5v and GND to the other pins. When the Pico output is triggered it will then energise the relay to control your door.

That’s not a schematic, but close enough to see your problem.

What! exactly do you want the button to do?
Here’s my guess. You want the Pico to control the relay and you want the button to tell the Pico to operate the relay?

You don’t say which relay module you are using, but you do need to wire Vcc and Ground to it.
There also has to be a ground wire from the Pico to the relay module.
You need a wire from a GPIO pin on the Pico to the Input of the relay module. Again, without knowing what module you are using, I would assume that it is probably 5V tolerant.
The button is wired from another GPIO pin to ground.

In ESPHome, your button is a Binary_Sensor. See Binary Sensor Component — ESPHome

The relay is a switch. See GPIO Switch — ESPHome

I have never used the Pico so I can’t advise which GPIO pins to use.