From e68b90c654240367ae2ef90944c97015864bc846 Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Wed, 28 Jun 2023 17:31:07 +0200 Subject: [PATCH] Document that some entities are named by their device class (#1823) * Document that some entities are named by their device class * Update docs/core/entity.md Co-authored-by: Martin Hjelmare --------- Co-authored-by: Martin Hjelmare --- docs/core/entity.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/core/entity.md b/docs/core/entity.md index 0f4cdc4b..5cddd695 100644 --- a/docs/core/entity.md +++ b/docs/core/entity.md @@ -106,6 +106,9 @@ The following properties are used and controlled by Home Assistant, and should n Avoid setting an entity's name to a hard coded English string, instead, the name should be [translated](/docs/internationalization/core#name-of-entities). Examples of when the name should not be translated are proper nouns, model names, and name provided by a 3rd-party library. +Some entities are automatically named after their device class, this includes [`binary_sensor`](/docs/core/entity/binary-sensor), [`button`](/docs/core/entity/button), [`number`](/docs/core/entity/number) and [`sensor`](/docs/core/entity/sensor) entities and in many cases don't need to be named. +For example, an unnamed sensor which has its device class set to `temperature` will be named "Temperature". + ### `has_entity_name` True (Mandatory for new integrations) The entity's name property only identifies the data point represented by the entity, and should not include the name of the device or the type of the entity. So for a sensor that represents the power usage of its device, this would be “Power usage”.