mirror of
https://github.com/home-assistant/developers.home-assistant.git
synced 2025-07-21 16:26:30 +00:00
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 <marhje52@gmail.com> --------- Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
parent
dd312fcb06
commit
e68b90c654
@ -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”.
|
||||
|
Loading…
x
Reference in New Issue
Block a user