Site updated at 2016-08-28 03:57:42 UTC
This commit is contained in:
parent
55052fc648
commit
b9e6e98d2b
378 changed files with 14339 additions and 1626 deletions
|
@ -91,13 +91,17 @@
|
|||
|
||||
<p>Home Assistant allows components and platforms to specify their dependencies and requirements using the variables <code class="highlighter-rouge">DEPENDENCIES</code> and <code class="highlighter-rouge">REQUIREMENTS</code>. Both are lists that contain strings.</p>
|
||||
|
||||
<h2>Dependencies</h2>
|
||||
|
||||
<p>Dependencies are other Home Assistant components that should be setup before the platform is loaded. An example is the MQTT sensor component, which requires an active connection to an MQTT broker. If Home Assistant is unable to load and setup the MQTT component, it will not setup the MQTT sensor component.</p>
|
||||
|
||||
<div class="language-python highlighter-rouge"><pre class="highlight"><code><span class="n">DEPENDENCIES</span> <span class="o">=</span> <span class="p">[</span><span class="s">'mqtt'</span><span class="p">]</span>
|
||||
</code></pre>
|
||||
</div>
|
||||
|
||||
<p>Requirements are Python libraries that you would normally install using <code class="highlighter-rouge">pip</code>. If Home Assistant is unable to install the requirements or verify it is installed, the component will fail to load.</p>
|
||||
<h2>Requirements</h2>
|
||||
|
||||
<p>Requirements are Python libraries that you would normally install using <code class="highlighter-rouge">pip</code> for your component. Home Assistant will try to install the requirements into the <code class="highlighter-rouge">deps</code> subdirectory of the Home Assistant configuration directory (<code class="highlighter-rouge">.home-assistant</code> by default) or verify it is already installed at startup. If that fails, the component will fail to load.</p>
|
||||
|
||||
<p>Requirements is a list of strings. Each entry is a pip compatible string. For example, the media player Cast platform depends on the Python package PyChromecast v0.6.12:</p>
|
||||
|
||||
|
@ -105,6 +109,23 @@
|
|||
</code></pre>
|
||||
</div>
|
||||
|
||||
<p>During development of a component, it can be useful to test against different versions of a requirement. This can be done in two steps, using pychromecast as an example:</p>
|
||||
|
||||
<ul>
|
||||
<li><code class="highlighter-rouge">pip install pychromecast==0.6.13 --target ~/.homeassistant/deps</code></li>
|
||||
<li><code class="highlighter-rouge">hass --skip-pip</code></li>
|
||||
</ul>
|
||||
|
||||
<p>This will use the specified version, and prevent Home Assistant from trying to override it with what is currently in <code class="highlighter-rouge">REQUIREMENTS</code>.</p>
|
||||
|
||||
<p>If you need to make changes to a requirement to support your component, it’s also possible to pip install from a checkout of the requirement.</p>
|
||||
|
||||
<ul>
|
||||
<li><code class="highlighter-rouge">git clone https://github.com/balloob/pychromecast.git</code></li>
|
||||
<li><code class="highlighter-rouge">pip install ./pychromecast</code></li>
|
||||
<li><code class="highlighter-rouge">hass --skip-pip</code></li>
|
||||
</ul>
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
|
|
|
@ -136,6 +136,7 @@
|
|||
<li><a href="https://github.com/coteyr/">coteyr</a></li>
|
||||
<li><a href="https://github.com/dale3h">Dale Higgs</a></li>
|
||||
<li><a href="https://github.com/Cinntax">Dan Cinnamon</a></li>
|
||||
<li><a href="https://github.com/dpford">Dan Ford</a></li>
|
||||
<li><a href="https://github.com/danielhiversen">Daniel Høyer Iversen</a></li>
|
||||
<li><a href="https://github.com/danieljkemp/">Daniel J. Kemp</a></li>
|
||||
<li><a href="https://github.com/usul27">Daniel Matuschek</a></li>
|
||||
|
@ -145,6 +146,7 @@
|
|||
<li><a href="https://github.com/dansullivan86/">Dan Sullivan</a></li>
|
||||
<li><a href="https://github.com/Xorso">Daren Lord</a></li>
|
||||
<li><a href="https://github.com/DavidLP">David-Leon Pohl</a></li>
|
||||
<li><a href="https://github.com/DavidMStraub">David Straub</a></li>
|
||||
<li><a href="https://github.com/abcminiuser">Dean Camera</a></li>
|
||||
<li><a href="https://github.com/FreekingDean">Dean Galvin</a></li>
|
||||
<li><a href="https://github.com/TheRealLink">Dennis Karpienski</a></li>
|
||||
|
@ -165,7 +167,6 @@
|
|||
<li><a href="https://github.com/GadgetReactor">GadgetReactor</a></li>
|
||||
<li><a href="https://github.com/kangaroo">Geoff Norton</a></li>
|
||||
<li><a href="https://github.com/goir">goir</a></li>
|
||||
<li><a href="https://github.com/gottsman">Kevin Gottsman</a></li>
|
||||
<li><a href="https://github.com/pavoni">Greg Dowling</a></li>
|
||||
<li><a href="https://github.com/gbarba">Guillem Barba</a></li>
|
||||
<li><a href="https://github.com/Gyran">Gustav Ahlberg</a></li>
|
||||
|
@ -201,13 +202,16 @@
|
|||
<li><a href="https://github.com/joopert">joopert</a></li>
|
||||
<li><a href="https://github.com/joshughes">Joseph Hughes</a></li>
|
||||
<li><a href="https://github.com/eagleamon">Joseph Piron</a></li>
|
||||
<li><a href="https://github.com/technicalpickles">Josh Nichols</a></li>
|
||||
<li><a href="https://github.com/JshWright/">Josh Wright</a></li>
|
||||
<li><a href="https://github.com/Juggels">Juggels</a></li>
|
||||
<li><a href="https://github.com/jd">Julien Danjou</a></li>
|
||||
<li><a href="https://github.com/justincmoy">Justin Moy</a></li>
|
||||
<li><a href="https://github.com/justyns/">Justyn Shull</a></li>
|
||||
<li><a href="https://github.com/kfgoode">Karen Goode</a></li>
|
||||
<li><a href="https://github.com/keatontaylor">Keaton Taylor</a></li>
|
||||
<li><a href="https://github.com/kennedyshead">kennedyshead</a></li>
|
||||
<li><a href="https://github.com/gottsman">Kevin Gottsman</a></li>
|
||||
<li><a href="https://github.com/kireyeu">kireyeu</a></li>
|
||||
<li><a href="https://github.com/kixam">kixam</a></li>
|
||||
<li><a href="https://github.com/kylehendricks">Kyle Hendricks</a></li>
|
||||
|
@ -222,7 +226,9 @@
|
|||
<li><a href="https://github.com/fingon">Markus Stenberg</a></li>
|
||||
<li><a href="https://github.com/MartinHjelmare">Martin Hjelmare</a></li>
|
||||
<li><a href="https://github.com/t30">Matteo Lampugnani</a></li>
|
||||
<li><a href="https://github.com/mgbowen">Matthew Bowen</a></li>
|
||||
<li><a href="https://github.com/mtreinish">Matthew Treinish</a></li>
|
||||
<li><a href="https://github.com/meatz">Matthias Grawinkel</a></li>
|
||||
<li><a href="https://github.com/michaelarnauts">Michaël Arnauts</a></li>
|
||||
<li><a href="https://github.com/Zyell">Michael Gilbert</a></li>
|
||||
<li><a href="https://github.com/michaelkuty">Michael Kutý</a></li>
|
||||
|
@ -236,6 +242,7 @@
|
|||
<li><a href="https://github.com/ngraziano">Nicolas Graziano</a></li>
|
||||
<li><a href="https://github.com/darookee">Nils Uliczka</a></li>
|
||||
<li><a href="https://github.com/nkgilley">Nolan Gilley</a></li>
|
||||
<li><a href="https://github.com/nunofgs">Nuno Sousa</a></li>
|
||||
<li><a href="https://github.com/mcdeck">Oliver van Porten</a></li>
|
||||
<li><a href="https://github.com/open-homeautomation">open-homeautomation</a></li>
|
||||
<li><a href="https://github.com/oeysteinhansen">Øystein Hansen</a></li>
|
||||
|
@ -251,6 +258,7 @@
|
|||
<li><a href="https://github.com/rkabadi">rkabadi</a></li>
|
||||
<li><a href="https://github.com/robbiet480">Robbie Trencheny</a></li>
|
||||
<li><a href="https://github.com/olimpiurob">Rob Olimpiu</a></li>
|
||||
<li><a href="https://github.com/roidayan">Roi Dayan</a></li>
|
||||
<li><a href="https://github.com/GreenTurtwig">Rowan Hine</a></li>
|
||||
<li><a href="https://github.com/rubund">rubund</a></li>
|
||||
<li><a href="https://github.com/rmkraus">Ryan Kraus</a></li>
|
||||
|
@ -269,6 +277,7 @@
|
|||
<li><a href="https://github.com/theolind">Theodor Lindquist</a></li>
|
||||
<li><a href="https://github.com/tilutza">tilutza</a></li>
|
||||
<li><a href="https://github.com/timharton">Tim Harton</a></li>
|
||||
<li><a href="https://github.com/tobiebooth">Tobie Booth</a></li>
|
||||
<li><a href="https://github.com/toddeye">toddeye</a></li>
|
||||
<li><a href="https://github.com/tomduijf">Tom Duijf</a></li>
|
||||
<li><a href="https://github.com/trollkarlen">trollkarlen</a></li>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue