How to "clean up" esphome without breaking it? (Dashboard, device name, yaml names, ...)

Hey everyone,

after having a bit of a slow start with this, I have my first esp32 up and running and integrated into HA. The problem: I’m not sure how to clean up the “mess” I created by trying things out, without breaking things again.

Setup: HA running on a RP 3B+, the esp32 is a devkit v1 board (in case that makes a difference)

How I got to where I am now:

  1. I connected an ESP32 devkit board via USB to my laptop, opened esphome within HA, and “adopted” the board to have it displayed in the esphome dashboard.
  2. I started editing the yaml file, and as part of that changed the name of the device to “433mhz”.
  3. After compiling/uploading the file to the board (via esphome web, as my instance runs on http), the dashboard now showed 2 devices: a new one as “online”, under the “433mhz” name (but with he old/original yaml file name attached to it), and a “new” device ready to be adopted, which was the same board (same situation as described in Have the devices working with new names, but I am still seeing `Adopt` panels with the old names)
  4. As it didn’t keep me from adding new features to the board, I started to extend the logic and compiled/uploaded with the existing yaml file of the 433mhz-named device.
  5. as the PI is not the fastest or newest, it started to crash more often the bigger the logic in the yaml file got
  6. I installed esphome locally on my windows laptop, as the command line version
  7. I created a new project/file named 433hub.yaml from scratch via the wizard, copied over the logic from the esphome dashboard version of the device, connected the board, and flashed the new version without an issue. The new device (433hub, including all entities) shows up in HA and works fine:

BUT: 2 things are still “out of place”, or feel weird to say the least:

  1. The integrations dashboard shows the old 433mhz name as part of the esphome tile:


    How come it shows the name of ONE device as the header of the esphome tile? When I googled, I found this screenshot, where the individual devices get listed UNDER the esphome tile title:
    https://www.home-assistant.io/images/blog/2021-05/integrations-dashboard.png

  2. When I go into the dashboard, it shows the device under the old name (433mhz), with the original yaml file from when I started in the first place, as offline:

Can I just delete the device from the esphome dashboard, and in the integrations dashboard rename the esphome tile from 433mhz to something generic?

In the end things work as they should, and I don’t NEED to clean things for functional reasons (I think?), as I will continue to code and compile/flash from my laptop command line, but I want to avoid to run into issues later when the whole system grew even further, and cleaning it up will be more tricky.

Anyone got any ideas? I hope I got this described halfway coherent…

Thanks a lot in advance! Cheers

Useful info Changing ESPHome Node Name.

If you select the"1 device" shown in the integration card, what name shows on the top left? it should be 433hub, if it is, it’s just a matter of renaming that device in the card.
image

Once you start adding more esphome device they will get listed under the esphme integration card,
image

Either way , you can delete the old 433mhz device, then delete the 433mhz yaml from the esphome dashboard, and add a new “433hub.yaml” with the code copied from your laptop, then re-add the device back to the esphome integration.

1 Like

Thanks a lot for the detailed response :slight_smile: , the renaming of the tile worked like a charm and without any negative implications.

About the “deleting and re-adding” proposal: will that work without compiling/flashing from within the esphome dashboard? As I don’t have the possibility to do so.

Yes, but you know you can always use ota wirelessly.

1 Like

Yep, although for me that doesn’t make a big difference, I have the ESPs readily available anyway and can just connect them to the laptop I do the compiling on anyway.

Okido, I now have a second esp32 connected, it shows up nicely in the device dashboard.

esphome_2devices

As I don’t use the dedicated esphome dashboard at all, I left it as it is (with the one old mixed-up entry), as adding the new board via command-line-flashing does everything I need. The newly added esp doesnt show up in the dashboard, but is fully integrated in HA, so I’m fine with the status quo.

Thanks a lot @Coolie1101 ! :slight_smile: