Skip to content

Home Assistant device name

flashg1 edited this page Jul 28, 2026 · 8 revisions

Please consider the following carefully before you rename a Home Assistant (HA) device and recreate the device's entity IDs.

  • User might just want to change the device name and not the names for the device's entities for a number of reasons.
  • The device entities might have historical data, and there is risk involved in changing these orphaned entities.
  • The device entities might be used in automation and scripts, and a pain to change them all.
  • The device name is also used to create SC entities to form part of the SC entity name, which means user will need to delete and re-add SC when they changed the device name.
  • Other custom integrations might not allow renaming of their entities even though their device name can be renamed, eg. OCPP. (Tested "Tesla Custom" integration do allow renaming of entities.)

⚠️ Most of the information after this point was generated by AI and has not been tested.

Home Assistant entity

A HA device entity name is made up of three parts,

[Domain].[Device name]_[Entity function]

eg. sensor.tesla23m3_energy_added
Domain = sensor
Device name = tesla23m3
Entity function = energy_added

If the device name is changed, a corresponding change is required in SolarCharger (SC) because the device name is used in the creation of SC's entities, eg.

[Domain].solarcharger_[Charger domain]_[Charger device name]_[Entity function]

eg. sensor.solarcharger_tesla_custom_tesla23m3_run_state

Once you changed the device name, you need to make a corresponding change in SolarCharger (SC). Please see description here on how to do this.

Some custom integrations will allow you to rename their device but not recreate their entity IDs, eg. OCPP.

The device name can be changed in Home Assistant by clicking on the pen in the top right corner, eg.

Settings > Devices & services > Tesla Custom Integration > Select the device

image

Once you have changed the device name, you have the option to recreate the device's entity IDs using the new name, ie.

image

Summary

To keep everything clean and consistent while renaming both the device and its entities, you can safely do this using Home Assistant's native renaming feature. This method renames the device, renames all associated entities automatically, and preserves your history. Because you are changing the entity_id, Home Assistant will view the new name as a new data stream for long-term charts. You must use the built-in migration tool immediately after to move your Energy Dashboard history over.

The rename and migration process

Follow this sequence to change the names globally and secure your history:

  1. Rename the Device & Entities:
  • Go to Settings > Devices & Services > Devices and select your device.
    • Click the three dots in the top-right corner and select Rename.
    • Type your new device name and click OK.
    • When Home Assistant asks: "Do you want to rename the entity IDs of all its entities?", click Yes. All entities are now renamed consistently.
  1. Migrate the Energy History (LTS):
  • Go to Developer Tools > Statistics.
    • Find your old energy entity ID in the list. It will show a warning status because it no longer exists under that name.
    • Click Fix Issue next to the old entity.
    • Choose the option to Change entity ID and select your new energy entity ID from the dropdown list.
    • Confirm the change. This permanently binds all historical energy data to the new entity name.
  1. Update the Energy Dashboard:
  • Go to Settings > Dashboards > Energy.
    • Click the edit icon next to your old energy tracking sensor.
    • Swap it out for the new entity ID and click save. Your historical graphs will fully restore within an hour.

⚠️ A Final Check on Automations

Renaming the device and entity IDs will break any automations, scripts, or Lovelace dashboard cards that explicitly target the old names. Home Assistant does not automatically rewrite YAML files or automation triggers when entity IDs change.

Clone this wiki locally