Adding a Pico W to HA that's running ESPhome

Ok, I’m new to this, so don’t hurt me too much! :slight_smile:

I saw a project for a garage door sensor that I followed online and thought it would be a good one to use at home. I have the Pico W, followed the steps to get all the necessary parts to load it on the Pico.

I get the firmware.uf2 file that I can transfer to the Pico, but I’m confused as to what API encryption key and OTA password I should pick. Each time I try to go into HA and try to add the device under the ESPhome dashboard it fails.

What am I doing wrong??? :frowning:

ESPhome is a tool to create firmwares, i.e. basically your firmware.uf2. Incidentally, it also adds an easy API for HA to talk to the devices, which is what I think you mean by “HA running ESPhome”.

So, your question basically doesn’t make sense, as only firmwares created with ESPhome (the tool) can be integrated in HA via the ESPhome integration.

So I have the ESPhome tool running on a Linux box at work, I compile the project I want, and generate the uf2 file that I then copy and transfer to the Pico.

When I get home, I’m having problems getting HA to recognize the Pico after its been flashed.

Do I need to specify different encryption keys and OTA passwords? If I flash the uf2 file at work, and don’t use the ESPhome tool within HA at all, what are the steps I need to get HA to recognize this device??

If you actually use ESPhome to build your firmware, api key and ota password are parameters of your project:

# Enable Home Assistant API
    key: "foobar"

  password: "barfoo"

I don’t use it to build my firmware, its being done via a different linux system that compiles the ESPhome part and then I copy the file to the Pico.

I’m doing:

$ pip3 install git+
$ esphome run garage-door.yml

I then copy the .uf2 file to the Pico.

I guess I'm wondering how to then add it to HA.  I can go in and 'add integration', but what option from the list should be picked?  ESPhome?  Something else??

What I wrote should be in “garage-door.yml”, which is the esphome “source” from which your firmware is built