Site updated at 2016-02-02 23:37:17 UTC

This commit is contained in:
Travis CI 2016-02-02 23:37:17 +00:00
parent 4485696875
commit 851640ed81
15 changed files with 173 additions and 194 deletions

View file

@ -114,30 +114,7 @@
<p>Components that interact with devices are structured in core- and platform logic. This allows the same logic to be used for different platforms.</p>
<p>For example, the built-in <code>switch</code> component consists of the following files in <a href="https://github.com/balloob/home-assistant/tree/master/homeassistant/components/switch"><code>homeassistant/components/switch/</code></a>:</p>
<table>
<thead>
<tr>
<th>File</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>__init__.py</td>
<td>Contains the Switch core logic.</td>
</tr>
<tr>
<td>wemo.py</td>
<td>WeMo platform logic. Included if in config <code>platform=wemo</code>.</td>
</tr>
<tr>
<td>tellstick.py</td>
<td>Tellstick platform logic. Included if in config <code>platform=tellstick</code>.</td>
</tr>
</tbody>
</table>
<p>For example, the built-in <code>switch</code> component consists of various platform in <a href="https://github.com/balloob/home-assistant/tree/master/homeassistant/components/switch"><code>homeassistant/components/switch/</code></a>. The file <code>\_\_init\_\_.py</code> contains the core logic of all platform and the <code>vendor_name.py</code> files only the relevant platform code.</p>
<p>If you are planning to add support for a new type of device to an existing component, you can get away with only writing platform logic. Have a look at how the component works with other platforms and create a similar file for the platform that you would like to add.</p>

View file

@ -124,22 +124,24 @@
<h3><a class="title-link" name="starting-development" href="#starting-development"></a> Starting development</h3>
<p>You will need to setup a development environment if you want to start developing a new feature or component for Home Assistant perform theses steps</p>
<p>You will need to setup a development environment if you want to start developing a new feature or component for Home Assistant perform theses steps. Visit the <a href="https://github.com/balloob/home-assistant">the Home Assistant repository</a> and click fork in the top right.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ git clone https://github.com/balloob/home-assistant.git
<div class="code"><pre>$ git clone https://github.com/your_github_username/home-assistant.git
$ git remote add upstream git@github.com:balloob/home-assistant.git
$ cd home-assistant
$ script/setup
</pre></div>
</div>
</div>
<p>we suggest that you setup a <a href="https://docs.python.org/3.4/library/venv.html">virtual environment</a> aka <code>venv</code> before running the setup script.</p>
<p>After following these steps, running <code>hass</code> will invoke your local installation.</p>
<h3><a class="title-link" name="submitting-improvements" href="#submitting-improvements"></a> Submitting improvements</h3>
<p>Improvements to Home Assistant should be submitted one feature at a time using Github pull<br />
requests.</p>
<p>Improvements to Home Assistant should be submitted one feature at a time using Github pull requests.</p>
<ol>
<li>Go to <a href="https://github.com/balloob/home-assistant">the Home Assistant repository</a> and click fork in the top right.</li>