Giving unique names to uptime_sensor, esphome_version etc

Hi,

I currently have two ESP32s running ESPHome and I’d like to send notifications on things like uptime, version etc. However I have discovered the names aren’t unique as such, just incremented by one. This makes it difficult to programmatically match “sensor.esphome_version_2” to a specific device, for example.

Is it possible to change the names in the ESPHome YAML itself? I’ve tried id and name parameters, and added / removed the ESPHome integration, but they reappeared with the same generic names.

Thanks

You have to give unique names at the component level. There is no hierarchy system

You can use substitution in case your nodes are similar. Check docs on usage.

Yes, they are completely nameable. Have you tried (this works for me):

sensor:
  - platform: uptime
    name: "Unique Uptime"

text_sensor:
  - platform: version
    name: "Unique espHome version"

You can name them anything you want.

1 Like

I did try this initially and it didn’t work, but I removed everything and started from scratch, and it worked as expected.

Thanks!