Merge pull request #916 from home-assistant/next

0.28
This commit is contained in:
Robbie Trencheny 2016-09-10 18:25:34 -07:00 committed by GitHub
commit f108046075
64 changed files with 834 additions and 160 deletions

View file

@ -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 platforms 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']

View file

@ -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.

View file

@ -39,6 +39,7 @@ This page contains a list of people who have contributed in one way or another t
- [Austin](https://github.com/trainman419)
- [Azelphur](https://github.com/Azelphur)
- [Bart274](https://github.com/Bart274)
- [Ben Bangert](https://github.com/bbangert)
- [blackdog70](https://github.com/blackdog70)
- [Brad Buran](https://github.com/bburan)
- [Brad Johnson](https://github.com/bradsk88)
@ -62,6 +63,7 @@ This page contains a list of people who have contributed in one way or another t
- [Dan Smith](https://github.com/kk7ds)
- [Dan Sullivan](https://github.com/dansullivan86/)
- [Daren Lord](https://github.com/Xorso)
- [Dave Banks](https://github.com/djbanks)
- [David-Leon Pohl](https://github.com/DavidLP)
- [David Straub](https://github.com/DavidMStraub)
- [Dean Camera](https://github.com/abcminiuser)
@ -136,6 +138,7 @@ This page contains a list of people who have contributed in one way or another t
- [Luca Soldi](https://github.com/LucaSoldi)
- [Lukas Hetzenecker](https://github.com/lukas-hetzenecker)
- [Magnus Knutas](https://github.com/MagnusKnutas)
- [Mal Curtis](https://github.com/snikch)
- [Malte Deiseroth](https://github.com/deisi)
- [Manoj](https://github.com/vmulpuru)
- [Marcelo Moreira de Mello](https://github.com/tchellomello)
@ -186,6 +189,7 @@ This page contains a list of people who have contributed in one way or another t
- [Sean Dague](https://github.com/sdague)
- [sfam](https://github.com/sfam)
- [Stefan Jonasson](https://github.com/stefan-jonasson)
- [Steven Barnes](https://github.com/salt-lick)
- [St. John Johnson](https://github.com/stjohnjohnson)
- [TangoAlpha](https://github.com/TangoAlpha)
- [Teagan Glenn](https://github.com/Teagan42)

View file

@ -26,7 +26,7 @@ This page describes the steps for publishing a new Home Assistant release.
2. Create missing documentation as stumbs in `next`.
3. Update the link on the frontpage (`source/index.html`) to link to the new release blog post and version number.
4. Create a pull request from `next` to `current` with the upcoming release number as title.
5. Merge `current` into `next` (`$ git checkout next && git merge master`) to make the PR mergable.
5. Merge `current` into `next` (`$ git checkout next && git merge current`) to make the PR mergable.
6. Merge pull request (blog post, updated frontpage, and all new documentation) to `current`.
### {% linkable_title Python Package Index %}