Add ESP Device to Add-on Manually?

I got an ESP-based smart plug today, and added it to HA through Integrations > Add Integration > ESPHome > {device IP} which worked fine. The new plug however doesn’t show up in the ESPHome add-on web UI. Is this expected?

I do not have the ability to use mDNS currently (IoT VLAN) and would have to do some painful work to get that going anyway (I still use .local from years gone by before becoming aware of mDNS). I have previously configured my other ESP devices for temp and humidity through the add-on UI and use ping for status. These were done by USB flashing so admittedly a different scenario.

How do I manually add the plug to the ESPHome add-on for updates and config modification? Or can I not do this? The plug works normally otherwise.

Yes, that is to be expected. The ESPHome Addon needs to have the device yaml in its folder for you to be able to update/modify the configuration.

Sometimes you’re able to ‘Adobt’ the device in the Addon, however the device has to be prepared for this and will then automatically be discovered by the addon.

See more here:

Thanks for the info. Is it normal then to forgo adopting ESP devices into ESPHome itself unless they meet specific criteria i.e. they are actual raw ESP boards rather than just ESP-based devices?

I don’t know about normal. I’m probably not normal, as I tend to take such devices apart and flash ESPHome on it - if at all possible - using the UART port on the device.

What brand of smart-plug is it?

I got it from Local Bytes, it’s potted so I don’t think I’m getting in there easily.

Found this thread, here, so that may help me.

As I see it, you have two options.

You could try to add it by manually creating a device in the addon and then adding the yaml.

Or try to use ESPHome ‘dashboard import’ feature.

You might have some problems with mDNS not working though.

Edit: Yes that thread might help you. Good luck :slight_smile:

Thanks for the help! The Local Bytes website has just crashed so I think it’s a problem for tomorrow.

Just go to their GitHub page provided in post#6. They provide the YAML file.

Thanks, they do provide it but they don’t say what to do with it. Do I add the YAML to a new file in /homeassistant/esphome? I don’t see any documentation relating to dashboard imports on Guides — ESPHome.

The link I provided above about sharing ESPHome devices give an example of using dashboard import.

But yes, either way you’ll have to add a new device in the addon. Select ESP8266 as board.

Thanks, it definitely provides an example configuration but it doesn’t actually say where that configuration is supposed to go.

Do I add the YAML from their Github to a new file in /homeassistant/esphome?

Yes. Click the + New Device button in the addon.

Thanks I appreciate it, that wasn’t clear and isn’t mentioned anywhere particularly as the New Device button prompts for a different set of steps none of which mention any kind of dashboard import. I guess that’s why everyone says “dashboard import” in quotes as it isn’t a real concept.

Thank you for the help.

I am going to give you a shortcut.

  • Open the ESPHome sidebat and click on +New Device
  • In the “New Device” window, click on “Continue”.
  • Give your device a unique name, click on “Next”
  • On “Select your device type”, click on ANY ESP device.
  • Click on “Skip”

You now have a new device on the ESPHome panel.

  • Click on “Edit”

  • Delete EVERYTHING after “friendly_name”

  • Change “esphome:” to “substitutions:”

  • In another browser tab, open the Github page and copy the YAML configuration:

  • Paste everything you just copied below the “friendly_name:”

  • Delete:

  name: localbytes-plug-pm-<NAME>
  friendly_name: Localbytes Plug PM <NAME>
  • Click on “Install”.
    When asked: " How do you want to install…" select “Manual Download”

ESPHome will now compile your binary file and put it into your Downloads folder.

How you flash the device depends on the device. Specifically, how do you put it into the flash mode?
I use ESPHomeFlasher. You can try the ESPHome Downloader, but I can’t help you because I’ve always just used ESPHomeFlasher.

Note- If you haven’t set up your Secrets file, ESPHome will ask you for your WiFi SSID and Password on first install. If you click on “Secrets” at the top of the page, ESPHome will have created the Secrets file for you. It will look something like this:

#  wifi password and ssid
wifi_ssid: XXX
wifi_password: XXX

This allows you to share your configuration on the forum and not expose your SSID and Password.

Some additional reading that might help put the pieces together.

1 Like

Thanks for this, but I don’t think it’s the same (nothing about flash mode for these plugs), but I appreciate it.

I think I’ve managed it so I’ll make a post below with how I did it for anyone else coming across this issue.

For anyone coming across this, here is how I set things up without mDNS.

  1. Set up your plug normally (plug in, connect to its hotspot and navigate to, set up on your WiFi)

  2. Once on your WiFi, navigate to Home Assistant and add it as a device via Integrations > + Add Integration > ESPHome > {Device IP}. Rename it all now.

  3. Open your ESPHome add-on and click the + New Device button, name it the same as your new plug, then click SKIP THIS STEP then select any board to generate a YAML file.

  4. Click EDIT on your new device, and paste the contents of the Manual Addition code found here. Change the name and friendly-name to match your plug’s name (the same name you’ve given so far)

  5. If you aren’t using mDNS like me, add the following to your file below Wifi using your plug’s (static) IP:

  ssid: !secret wifi_ssid
  password: !secret wifi_password


From here you can click INSTALL (wirelesly) and that should be it. The plug is now present and able to be updated/configured via ESPHome. The web UI for the plug (port 80) will no longer be open after this.

Essentially the same thing I said. You left out the step of how you flashed the code to the device.

You click install (over wireless) as I mention at the bottom of my post.

Yeah not dissimilar, but there’s no need to manually download, remove the substitution or flash anything.