Site updated at 2015-01-25 02:05:54 UTC

This commit is contained in:
Paulus Schoutsen 2015-01-24 18:05:54 -08:00
parent ace848e136
commit a7aa4deb86
28 changed files with 3432 additions and 231 deletions

View file

@ -96,7 +96,23 @@
<p>Home Assistant offers <a href="/components/">built-in components</a> but it
is easy to built your own.</p>
is easy to built your own. If you are the kind of person that likes to learn from code rather then guide then head over to the <a href="https://github.com/balloob/home-assistant/tree/master/config/custom_components"><code>config/custom_compnents</code></a> folder in the repository for two example components.</p>
<p>The first is <a href="https://github.com/balloob/home-assistant/blob/master/config/custom_components/hello_world.py">hello_world.py</a>, which is the classic Hello World example for Home Assistant. The second one is <a href="https://github.com/balloob/home-assistant/blob/master/config/custom_components/example.py">example.py</a> which showcases various ways you can tap into Home Assistant to be notified when certain events occur.</p>
<p>If you want to load these components in Home Assistant, add the following lines to your <code>home-assistant.conf</code> file:</p>
<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>[hello_world]
</span><span class='line'>
</span><span class='line'>[example]
</span><span class='line'>target=TARGET_ENTITY</span></code></pre></td></tr></table></div></figure>
<p><code>TARGET_ENTITY</code> should be one of your devices that can be turned on and off, ie a light or a switch. Example value could be <code>light.Ceiling</code> or <code>switch.AC</code> (if you have these devices with those names).</p>
<h2>Loading components</h2>