diff --git a/docs/architecture_entities.md b/docs/architecture_entities.md new file mode 100644 index 00000000..8f5634fe --- /dev/null +++ b/docs/architecture_entities.md @@ -0,0 +1,37 @@ +--- +title: "Entity Architecture" +sidebar_label: Entity +--- + +![Architecture overview of Hass.io](/img/en/architecture/entities_architecture.svg) + +## Configuration + +Configuration is provided by the configuration.yaml file or by a Config Entry from the Config Manager. + +## Component + +Examples of components: `light`, `switch`. + +The component is responsible for defining the Abstract Entity Class and services to control the entities. + +## Entity Component + +The Entity Component is responsible for: + + - Distributing the configuration to the platforms + - Forward config entries and discoveries + - Collect entities for service calls + - Optionally maintain a group of all entities + +## Entity Platform + +The Entity Platform manages all entities for the platform and polls them for updates if necessary. + +When adding entities, the Entity Platform will query the Entity Registry to make sure that the entities to be added have the correct entity IDs. + +## Platform + +Examples of platforms: `light.hue`, `switch.wemo`. + +Platform uses configuration to query the external device/service and add entities to the entity platform. diff --git a/docs/architecture_hassio.md b/docs/architecture_hassio.md index ef3958bf..aee23482 100644 --- a/docs/architecture_hassio.md +++ b/docs/architecture_hassio.md @@ -3,7 +3,7 @@ title: "Hass.io Architecture" sidebar_label: Hass.io --- -Architecture overview of Hass.io +![Architecture overview of Hass.io](/img/en/architecture/hassio.png) ## Host Control (HC) diff --git a/website/i18n/en.json b/website/i18n/en.json index 422df071..f2204672 100644 --- a/website/i18n/en.json +++ b/website/i18n/en.json @@ -6,6 +6,8 @@ "tagline": "All you need to start developing for Home Assistant", "architecture_components": "Components Architecture", "Components": "Components", + "architecture_entities": "Entity Architecture", + "Entity": "Entity", "architecture_hassio": "Hass.io Architecture", "Hass.io": "Hass.io", "architecture_index": "Architecture", diff --git a/website/sidebars.json b/website/sidebars.json index 06f4dbcf..9cac266b 100644 --- a/website/sidebars.json +++ b/website/sidebars.json @@ -3,6 +3,7 @@ "Architecture": [ "architecture_index", "architecture_components", + "architecture_entities", "architecture_hassio" ] }, diff --git a/website/static/img/en/architecture/entities_architecture.svg b/website/static/img/en/architecture/entities_architecture.svg new file mode 100644 index 00000000..bf82c5a0 --- /dev/null +++ b/website/static/img/en/architecture/entities_architecture.svg @@ -0,0 +1 @@ + \ No newline at end of file