Best practice for naming devices and entities? (ie. "Basement Leak Sensor" as device name?)

I’m really having a difficult time deciding on the best naming convention for Home Assistant.

The two popular options seem to be:
[domain].[location/room][device][extra info]
[domain].[device][location/room][extra info]

I’ve read that the first option is most similar to HomeKit or other commercial solutions so I’m leaning towards that (and so it’s easier to integrate with HomeBridge).

Regardless of the naming convention, what is the correct way to rename the device and entities? It seems like the easiest way is to use [Settings] → [Devices] → […] → and then answer to renaming all entities.

However, this requires you to name each device such as “Bedroom Master Smoke Detector” so the entities are named […].bedroom_master_smoke_detector.

What is everybody else using for naming convention? It would be great if there was a best practice guide (especially from the developers!)

I don’t think there could be (or should be) a naming guide because each users idea of what makes sense to them is likely unique.

but FWIW, I generally use the “domain.location_type_function” convention for my physical devices where it makes sense.

for example:

sensor.basement_fridge_sensor_temperature
sensor.comp_room_light_button_battery_level
binary_sensor.computer_room_window_sensor (this is on or off so I leave out the type = position)

2 Likes