Add entity registry

This commit is contained in:
Paulus Schoutsen 2018-04-28 21:48:23 -04:00
parent 541cd49df0
commit 5f7ec7f1ed
3 changed files with 27 additions and 0 deletions

View File

@ -0,0 +1,22 @@
---
title: Entity Registry
sidebar_label: Introduction
---
The entity registry is a registry where Home Assistant keeps track of entities. Any entity that is added to Home Assistant and having a unique ID will be registered in the registry.
Being registered has the advantage that the same entity will always get the same entity ID. It will also prevent other entities from using that entity ID.
A user is also able to override the name of an entity in the entity registry. When set, the name of the entity registry is used in favor of the name the device might give itself.
## Unique ID requirements
An entity is looked up in the registry based on a combination of domain (ie `light`), platform name (ie `hue`) and the unique ID of the entity. It is therefore very important that the unique ID is unique! It is also important that it is not possible for the user to change the unique ID, because that means it will lose all its settings related to it.
Good sources for a unique ID:
- Serial number of a device
- MAC address of a device
- latitude/longitude
If a device has a single serial but provides multiple entities, combine the serial with unique identifiers for the entities. For example, if a device measures both temperature and humidithy, you can uniqueley identify the entities using `{serial}-{sensor_type}`.

View File

@ -46,6 +46,7 @@
"development_submitting": "Submit your work", "development_submitting": "Submit your work",
"development_testing": "Testing your code", "development_testing": "Testing your code",
"development_validation": "Validate the input", "development_validation": "Validate the input",
"entity_registry_index": "Entity Registry",
"external_api_rest_python": "REST API - Python bindings", "external_api_rest_python": "REST API - Python bindings",
"external_api_rest": "RESTful API", "external_api_rest": "RESTful API",
"external_api_server_sent_events": "Server-sent events", "external_api_server_sent_events": "Server-sent events",
@ -82,6 +83,7 @@
"Configuration.yaml": "Configuration.yaml", "Configuration.yaml": "Configuration.yaml",
"Config Entries": "Config Entries", "Config Entries": "Config Entries",
"Data Entry Flow": "Data Entry Flow", "Data Entry Flow": "Data Entry Flow",
"Entity Registry": "Entity Registry",
"Developing a feature": "Developing a feature", "Developing a feature": "Developing a feature",
"Development 101": "Development 101", "Development 101": "Development 101",
"Creating Platforms": "Creating Platforms", "Creating Platforms": "Creating Platforms",

View File

@ -15,6 +15,9 @@
], ],
"Data Entry Flow": [ "Data Entry Flow": [
"data_entry_flow_index" "data_entry_flow_index"
],
"Entity Registry": [
"entity_registry_index"
] ]
}, },
"Extending Frontend": { "Extending Frontend": {