From 9f7923e82724693d5990eaa1386c36c504a323ee Mon Sep 17 00:00:00 2001 From: Josh Nichols Date: Sun, 28 Aug 2016 20:58:32 -0400 Subject: [PATCH] Link to more things --- source/developers/add_new_platform.markdown | 6 +++--- source/developers/architecture_components.markdown | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/developers/add_new_platform.markdown b/source/developers/add_new_platform.markdown index 73bf3e5367c..aeee02c6b29 100644 --- a/source/developers/add_new_platform.markdown +++ b/source/developers/add_new_platform.markdown @@ -9,7 +9,7 @@ sharing: true footer: true --- -Components that interact with devices are called Entity Components. They are structured in core- and platform logic. This allows the same logic to handle a light to be used by different brands. +Components that interact with devices are called [Entity Components](https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/helpers/entity_component.py). They are structured in core- and platform logic. This allows the same logic to handle a light to be used by different brands. For example, the built-in `switch` component consists of various platform in [`homeassistant/components/switch/`](https://github.com/home-assistant/home-assistant/tree/master/homeassistant/components/switch). The file `__init__.py` contains the core logic of all platform and the `vendor_name.py` files only the relevant platform code. @@ -22,11 +22,11 @@ If you are planning to add support for a new type of device to an existing compo One of the rules for Home Assistant is that platform logic should never interface directly with devices but use a third-party Python 3 library to do so. This way Home Assistant is able to share code with the Python community and we can keep the project maintainable. -To integrate the third-party library you create an Entity class for your device. Entities are Home Assistant's representation of lights, switches, sensors, etc. and are derived from the [Entity Abstract Class](https://github.com/home-assistant/home-assistant/blob/master/homeassistant/helpers/entity.py). This abstract class contains logic for integrating most standard features into your entities, such as visibility, entity IDs, updates, and much more. +To integrate the third-party library you create an [Entity class](https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/helpers/entity.py) for your device. Entities are Home Assistant's representation of lights, switches, sensors, etc. and are derived from the [Entity Abstract Class](https://github.com/home-assistant/home-assistant/blob/master/homeassistant/helpers/entity.py). This abstract class contains logic for integrating most standard features into your entities, such as visibility, entity IDs, updates, and much more. ### {% linkable_title Requirements and dependencies %} -Platforms can specify dependencies and requirements the same way as a component does. +Platforms can specify dependencies and requirements [the same way as a component does](/developers/component_deps_and_reqs): ```python REQUIREMENTS = ['some-package==2.0.0', 'some-other-package==2.5.0'] diff --git a/source/developers/architecture_components.markdown b/source/developers/architecture_components.markdown index ae8b36320df..c6612fb2964 100644 --- a/source/developers/architecture_components.markdown +++ b/source/developers/architecture_components.markdown @@ -22,7 +22,7 @@ We can differentiate between two different types of components within Home Assis These components will track devices within a specific domain and consist of a core part and platform-specific logic. These components make their information available via the State Machine and the Event Bus. The component will also register services in the Service Registry to expose control of the devices. -For example, one of the built-in components is the `switch` component. This component is responsible for interaction with different types of switches. +For example, one of the built-in components is the [`switch` component](/components/switch/). This component is responsible for interaction with different types of switches. A platform provides support for a particular kind/brand of device. For example, a switch could use a WeMo or Orvibo platform, and a light component might interact with the Hue or LiFX platform.