576 lines
33 KiB
HTML
576 lines
33 KiB
HTML
<!doctype html>
|
||
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
|
||
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
|
||
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
|
||
<!--[if gt IE 8]><!--> <html> <!--<![endif]-->
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||
<title>Add-On Configuration - Home Assistant</title>
|
||
<meta name="author" content="Home Assistant">
|
||
<meta name="description" content="Steps on how-to create an add-on for Hass.io.">
|
||
<meta name="viewport" content="width=device-width">
|
||
<link rel="canonical" href="https://home-assistant.io/developers/hassio/addon_config/">
|
||
<meta property="fb:app_id" content="338291289691179">
|
||
<meta property="og:title" content="Add-On Configuration">
|
||
<meta property="og:site_name" content="Home Assistant">
|
||
<meta property="og:url" content="https://home-assistant.io/developers/hassio/addon_config/">
|
||
<meta property="og:type" content="website">
|
||
<meta property="og:description" content="Steps on how-to create an add-on for Hass.io.">
|
||
<meta property="og:image" content="https://home-assistant.io/images/default-social.png">
|
||
<meta name="twitter:card" content="summary_large_image">
|
||
<meta name="twitter:site" content="@home_assistant">
|
||
<meta name="twitter:title" content="Add-On Configuration">
|
||
<meta name="twitter:description" content="Steps on how-to create an add-on for Hass.io.">
|
||
<meta name="twitter:image" content="https://home-assistant.io/images/default-social.png">
|
||
<link href="/stylesheets/screen.css" media="screen, projection, print" rel="stylesheet">
|
||
<link href="/atom.xml" rel="alternate" title="Home Assistant" type="application/atom+xml">
|
||
<link rel='shortcut icon' href='/images/favicon.ico' />
|
||
<link rel='icon' type='image/png' href='/images/favicon-192x192.png' sizes='192x192' />
|
||
</head>
|
||
<body >
|
||
<header class='site-header'>
|
||
<div class="grid-wrapper">
|
||
<div class="grid">
|
||
<div class="grid__item three-tenths lap-two-sixths palm-one-whole ha-title">
|
||
<a href="/" class="site-title">
|
||
<img width='40' src='/demo/favicon-192x192.png'>
|
||
<span>Home Assistant</span>
|
||
</a>
|
||
</div>
|
||
<div class="grid__item seven-tenths lap-four-sixths palm-one-whole">
|
||
<nav>
|
||
<input type="checkbox" id="toggle">
|
||
<label for="toggle" class="toggle" data-open="Main Menu" data-close="Close Menu"></label>
|
||
<ul class="menu pull-right">
|
||
<li><a href="/getting-started/">Getting started</a></li>
|
||
<li><a href="/components/">Components</a></li>
|
||
<li><a href="/docs/">Docs</a></li>
|
||
<li><a href="/cookbook/">Examples</a></li>
|
||
<li><a href="/developers/">Developers</a></li>
|
||
<li><a href="/blog/">Blog</a></li>
|
||
<li><a href="/help/">Need help?</a></li>
|
||
<li><a href='#' class='show-search'><i class="icon-search"></i></a></li>
|
||
</ul>
|
||
</nav>
|
||
<div class='search-container' style='display: none'>
|
||
<div class='search'>
|
||
<i class="icon-search"></i>
|
||
<input id='search' placeholder='Search the docs…'>
|
||
<a href='#' class='close'><i class="icon-remove-sign"></i></a>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</header>
|
||
<div class="grid-wrapper">
|
||
<div class="grid grid-center">
|
||
<div class="grid__item two-thirds lap-one-whole palm-one-whole">
|
||
<article class="page">
|
||
<header>
|
||
<h1 class="title indent">
|
||
Add-On Configuration
|
||
</h1>
|
||
</header>
|
||
<hr class="divider">
|
||
<p>Each add-on is stored in a folder. The file structure looks like this:</p>
|
||
<div class="highlighter-rouge"><pre class="highlight"><code>addon_name/
|
||
Dockerfile
|
||
config.json
|
||
run.sh
|
||
</code></pre>
|
||
</div>
|
||
<h2><a class="title-link" name="add-on-script" href="#add-on-script"></a> Add-on script</h2>
|
||
<p>As with every Docker container, you will need a script to run when the container is started. A user might run many add-ons, so it is encouraged to try to stick to Bash scripts if you’re doing simple things.</p>
|
||
<p>When developing your script:</p>
|
||
<ul>
|
||
<li><code class="highlighter-rouge">/data</code> is a volume for persistent storage.</li>
|
||
<li><code class="highlighter-rouge">/data/options.json</code> contains the user configuration. You can use <code class="highlighter-rouge">jq</code> inside your shell script to parse this data. However, you might have to install <code class="highlighter-rouge">jq</code> as a separate package in your container (see <code class="highlighter-rouge">Dockerfile</code> below).</li>
|
||
</ul>
|
||
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="nv">CONFIG_PATH</span><span class="o">=</span>/data/options.json
|
||
|
||
<span class="nv">TARGET</span><span class="o">=</span><span class="s2">"</span><span class="k">$(</span>jq --raw-output <span class="s1">'.target'</span> <span class="nv">$CONFIG_PATH</span><span class="k">)</span><span class="s2">"</span>
|
||
</code></pre>
|
||
</div>
|
||
<p>So if your <code class="highlighter-rouge">options</code> contain</p>
|
||
<div class="language-json highlighter-rouge"><pre class="highlight"><code><span class="p">{</span><span class="w"> </span><span class="nt">"target"</span><span class="p">:</span><span class="w"> </span><span class="s2">"beer"</span><span class="w"> </span><span class="p">}</span><span class="w">
|
||
</span></code></pre>
|
||
</div>
|
||
<p>then there will be a variable <code class="highlighter-rouge">TARGET</code> containing <code class="highlighter-rouge">beer</code> in the environment of your bash file afterwards.</p>
|
||
<h2><a class="title-link" name="add-on-docker-file" href="#add-on-docker-file"></a> Add-on Docker file</h2>
|
||
<p>All add-ons are based on Alpine Linux 3.6. Hass.io will automatically substitute the right base image based on the machine architecture. Add <code class="highlighter-rouge">tzdata</code> if you need run in a different timezone. <code class="highlighter-rouge">tzdata</code> Is is already added to our base images.</p>
|
||
<div class="highlighter-rouge"><pre class="highlight"><code>ARG BUILD_FROM
|
||
FROM $BUILD_FROM
|
||
|
||
ENV LANG C.UTF-8
|
||
|
||
# Install requirements for add-on
|
||
RUN apk add --no-cache jq
|
||
|
||
# Copy data for add-on
|
||
COPY run.sh /
|
||
RUN chmod a+x /run.sh
|
||
|
||
CMD [ "/run.sh" ]
|
||
</code></pre>
|
||
</div>
|
||
<p>If you don’t use local build on device or our build script, make sure that the Dockerfile have also a set of labels include:</p>
|
||
<div class="highlighter-rouge"><pre class="highlight"><code>LABEL io.hass.version="VERSION" io.hass.type="addon" io.hass.arch="armhf|aarch64|i386|amd64"
|
||
</code></pre>
|
||
</div>
|
||
<p>It is possible to use own base image with <code class="highlighter-rouge">build.json</code> or if you do not need support for automatic multi-arch building you can also use a simple docker <code class="highlighter-rouge">FROM</code>.</p>
|
||
<h3><a class="title-link" name="build-args" href="#build-args"></a> Build Args</h3>
|
||
<p>We support the following build arguments by default:</p>
|
||
<table>
|
||
<thead>
|
||
<tr>
|
||
<th>ARG</th>
|
||
<th>Description</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr>
|
||
<td>BUILD_FROM</td>
|
||
<td>Hold image for dynamic builds or buildings over our systems.</td>
|
||
</tr>
|
||
<tr>
|
||
<td>BUILD_VERSION</td>
|
||
<td>Add-on version (read from <code class="highlighter-rouge">config.json</code>).</td>
|
||
</tr>
|
||
<tr>
|
||
<td>BUILD_ARCH</td>
|
||
<td>Hold current build arch inside.</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<h2><a class="title-link" name="add-on-config" href="#add-on-config"></a> Add-on config</h2>
|
||
<p>The config for an add-on is stored in <code class="highlighter-rouge">config.json</code>.</p>
|
||
<div class="language-json highlighter-rouge"><pre class="highlight"><code><span class="p">{</span><span class="w">
|
||
</span><span class="nt">"name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"xy"</span><span class="p">,</span><span class="w">
|
||
</span><span class="nt">"version"</span><span class="p">:</span><span class="w"> </span><span class="s2">"1.2"</span><span class="p">,</span><span class="w">
|
||
</span><span class="nt">"slug"</span><span class="p">:</span><span class="w"> </span><span class="s2">"folder"</span><span class="p">,</span><span class="w">
|
||
</span><span class="nt">"description"</span><span class="p">:</span><span class="w"> </span><span class="s2">"long description"</span><span class="p">,</span><span class="w">
|
||
</span><span class="nt">"arch"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="s2">"amd64"</span><span class="p">],</span><span class="w">
|
||
</span><span class="nt">"url"</span><span class="p">:</span><span class="w"> </span><span class="s2">"website with more information about add-on (ie a forum thread for support)"</span><span class="p">,</span><span class="w">
|
||
</span><span class="nt">"startup"</span><span class="p">:</span><span class="w"> </span><span class="s2">"application"</span><span class="p">,</span><span class="w">
|
||
</span><span class="nt">"boot"</span><span class="p">:</span><span class="w"> </span><span class="s2">"auto"</span><span class="p">,</span><span class="w">
|
||
</span><span class="nt">"ports"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
|
||
</span><span class="nt">"123/tcp"</span><span class="p">:</span><span class="w"> </span><span class="mi">123</span><span class="w">
|
||
</span><span class="p">},</span><span class="w">
|
||
</span><span class="nt">"map"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="s2">"config:rw"</span><span class="p">,</span><span class="w"> </span><span class="s2">"ssl"</span><span class="p">],</span><span class="w">
|
||
</span><span class="nt">"options"</span><span class="p">:</span><span class="w"> </span><span class="p">{},</span><span class="w">
|
||
</span><span class="nt">"schema"</span><span class="p">:</span><span class="w"> </span><span class="p">{},</span><span class="w">
|
||
</span><span class="nt">"image"</span><span class="p">:</span><span class="w"> </span><span class="s2">"repo/{arch}-my-custom-addon"</span><span class="w">
|
||
</span><span class="p">}</span><span class="w">
|
||
</span></code></pre>
|
||
</div>
|
||
<table>
|
||
<thead>
|
||
<tr>
|
||
<th>Key</th>
|
||
<th>Required</th>
|
||
<th>Description</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr>
|
||
<td>name</td>
|
||
<td>yes</td>
|
||
<td>Name of the add-on</td>
|
||
</tr>
|
||
<tr>
|
||
<td>version</td>
|
||
<td>yes</td>
|
||
<td>Version of the add-on</td>
|
||
</tr>
|
||
<tr>
|
||
<td>slug</td>
|
||
<td>yes</td>
|
||
<td>Slug of the add-on</td>
|
||
</tr>
|
||
<tr>
|
||
<td>description</td>
|
||
<td>yes</td>
|
||
<td>Description of the add-on</td>
|
||
</tr>
|
||
<tr>
|
||
<td>arch</td>
|
||
<td>no</td>
|
||
<td>List of supported arch: <code class="highlighter-rouge">armhf</code>, <code class="highlighter-rouge">aarch64</code>, <code class="highlighter-rouge">amd64</code>, <code class="highlighter-rouge">i386</code>. Default all.</td>
|
||
</tr>
|
||
<tr>
|
||
<td>url</td>
|
||
<td>no</td>
|
||
<td>Homepage of the addon. Here you can explain the add-ons and options.</td>
|
||
</tr>
|
||
<tr>
|
||
<td>startup</td>
|
||
<td>yes</td>
|
||
<td><code class="highlighter-rouge">initialize</code> will start addon on setup of Hass.io. <code class="highlighter-rouge">system</code> is for things like databases and not dependent on other things. <code class="highlighter-rouge">services</code> will start before Home Assistant, while <code class="highlighter-rouge">application</code> is started afterwards. Finally <code class="highlighter-rouge">once</code> is for applications that don’t run as a daemon.</td>
|
||
</tr>
|
||
<tr>
|
||
<td>webui</td>
|
||
<td>no</td>
|
||
<td>A URL for web interface of this add-on. Like <code class="highlighter-rouge">http://[HOST]:[PORT:2839]/dashboard</code>, the port needs the internal port, which will be replaced with the effective port. It is also possible to bind the proto part to a config options with: <code class="highlighter-rouge">[PROTO:option_name]://[HOST]:[PORT:2839]/dashboard</code> and he lookup if they is True and going to <code class="highlighter-rouge">https</code>.</td>
|
||
</tr>
|
||
<tr>
|
||
<td>boot</td>
|
||
<td>yes</td>
|
||
<td><code class="highlighter-rouge">auto</code> by system and manual or only <code class="highlighter-rouge">manual</code></td>
|
||
</tr>
|
||
<tr>
|
||
<td>ports</td>
|
||
<td>no</td>
|
||
<td>Network ports to expose from the container. Format is <code class="highlighter-rouge">"container-port/type": host-port</code>.</td>
|
||
</tr>
|
||
<tr>
|
||
<td>host_network</td>
|
||
<td>no</td>
|
||
<td>If that is True, the add-on run on host network.</td>
|
||
</tr>
|
||
<tr>
|
||
<td>devices</td>
|
||
<td>no</td>
|
||
<td>Device list to map into the add-on. Format is: <code class="highlighter-rouge"><path_on_host>:<path_in_container>:<cgroup_permissions></code>. i.e. <code class="highlighter-rouge">/dev/ttyAMA0:/dev/ttyAMA0:rwm</code></td>
|
||
</tr>
|
||
<tr>
|
||
<td>hassio_api</td>
|
||
<td>no</td>
|
||
<td>This add-on can access to Hass.io REST API. It set the host alias <code class="highlighter-rouge">hassio</code>.</td>
|
||
</tr>
|
||
<tr>
|
||
<td>homeassistant_api</td>
|
||
<td>no</td>
|
||
<td>This add-on can access to Hass.io Home-Assistant REST API proxy. Use <code class="highlighter-rouge">http://hassio/homeassistant/api</code>.</td>
|
||
</tr>
|
||
<tr>
|
||
<td>privileged</td>
|
||
<td>no</td>
|
||
<td>Privilege for access to hardware/system. Available access: <code class="highlighter-rouge">NET_ADMIN</code>, <code class="highlighter-rouge">SYS_ADMIN</code>, <code class="highlighter-rouge">SYS_RAWIO</code></td>
|
||
</tr>
|
||
<tr>
|
||
<td>map</td>
|
||
<td>no</td>
|
||
<td>List of maps for additional Hass.io folders. Possible values: <code class="highlighter-rouge">config</code>, <code class="highlighter-rouge">ssl</code>, <code class="highlighter-rouge">addons</code>, <code class="highlighter-rouge">backup</code>, <code class="highlighter-rouge">share</code>. Defaults to <code class="highlighter-rouge">ro</code>, which you can change by adding <code class="highlighter-rouge">:rw</code> to the end of the name.</td>
|
||
</tr>
|
||
<tr>
|
||
<td>environment</td>
|
||
<td>no</td>
|
||
<td>A dict of environment variable to run add-on.</td>
|
||
</tr>
|
||
<tr>
|
||
<td>audio</td>
|
||
<td>no</td>
|
||
<td>Boolean. Mark this add-on to use internal an audio system. The available environment variables are <code class="highlighter-rouge">ALSA_INPUT</code> and <code class="highlighter-rouge">ALSA_OUTPUT</code> which provide internal information to access alsa.</td>
|
||
</tr>
|
||
<tr>
|
||
<td>gpio</td>
|
||
<td>no</td>
|
||
<td>Boolean. If this is set to True, <code class="highlighter-rouge">/sys/class/gpio</code> will map into add-on for access to GPIO interface from kernel. Some library need also <code class="highlighter-rouge">/dev/mem</code> and <code class="highlighter-rouge">SYS_RAWIO</code> for read/write access to this device.</td>
|
||
</tr>
|
||
<tr>
|
||
<td>stdin</td>
|
||
<td>no</td>
|
||
<td>Boolean. If that is enable, you can use the STDIN with Hass.io API.</td>
|
||
</tr>
|
||
<tr>
|
||
<td>legacy</td>
|
||
<td>no</td>
|
||
<td>Boolean. If the docker image have no hass.io labels, you can enable the legacy mode to use the config data.</td>
|
||
</tr>
|
||
<tr>
|
||
<td>options</td>
|
||
<td>yes</td>
|
||
<td>Default options value of the add-on</td>
|
||
</tr>
|
||
<tr>
|
||
<td>schema</td>
|
||
<td>yes</td>
|
||
<td>Schema for options value of the add-on. It can be <code class="highlighter-rouge">False</code> to disable schema validation and use custom options.</td>
|
||
</tr>
|
||
<tr>
|
||
<td>image</td>
|
||
<td>no</td>
|
||
<td>For use with Docker Hub.</td>
|
||
</tr>
|
||
<tr>
|
||
<td>timeout</td>
|
||
<td>no</td>
|
||
<td>Default 10 (second). The timeout to wait until the docker is done or will be killed.</td>
|
||
</tr>
|
||
<tr>
|
||
<td>tmpfs</td>
|
||
<td>no</td>
|
||
<td>Mount a tmpfs file system in <code class="highlighter-rouge">/tmpfs</code>. Valide format for this option is : <code class="highlighter-rouge">size=XXXu,uid=N,rw</code>. Size is mandatory, valid units (<code class="highlighter-rouge">u</code>) are <code class="highlighter-rouge">k</code>, <code class="highlighter-rouge">m</code> and <code class="highlighter-rouge">g</code> and <code class="highlighter-rouge">XXX</code> has to be replaced by a number. <code class="highlighter-rouge">uid=N</code> (with <code class="highlighter-rouge">N</code> the uid number) and <code class="highlighter-rouge">rw</code> are optional.</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<h3><a class="title-link" name="options--schema" href="#options--schema"></a> Options / Schema</h3>
|
||
<p>The <code class="highlighter-rouge">options</code> dictionary contains all available options and their default value. Set the default value to <code class="highlighter-rouge">null</code> if the value is required to be given by the user before the add-on can start, and it show it inside default values. Only nested arrays and dictionaries are supported with a deep of two size. If you want make a option optional, put <code class="highlighter-rouge">?</code> to the end of data type, otherwise it will be a required value.</p>
|
||
<div class="language-json highlighter-rouge"><pre class="highlight"><code><span class="p">{</span><span class="w">
|
||
</span><span class="nt">"message"</span><span class="p">:</span><span class="w"> </span><span class="s2">"custom things"</span><span class="p">,</span><span class="w">
|
||
</span><span class="nt">"logins"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="w">
|
||
</span><span class="p">{</span><span class="w"> </span><span class="nt">"username"</span><span class="p">:</span><span class="w"> </span><span class="s2">"beer"</span><span class="p">,</span><span class="w"> </span><span class="nt">"password"</span><span class="p">:</span><span class="w"> </span><span class="s2">"123456"</span><span class="w"> </span><span class="p">},</span><span class="w">
|
||
</span><span class="p">{</span><span class="w"> </span><span class="nt">"username"</span><span class="p">:</span><span class="w"> </span><span class="s2">"cheep"</span><span class="p">,</span><span class="w"> </span><span class="nt">"password"</span><span class="p">:</span><span class="w"> </span><span class="s2">"654321"</span><span class="w"> </span><span class="p">}</span><span class="w">
|
||
</span><span class="p">],</span><span class="w">
|
||
</span><span class="nt">"random"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="s2">"haha"</span><span class="p">,</span><span class="w"> </span><span class="s2">"hihi"</span><span class="p">,</span><span class="w"> </span><span class="s2">"huhu"</span><span class="p">,</span><span class="w"> </span><span class="s2">"hghg"</span><span class="p">],</span><span class="w">
|
||
</span><span class="nt">"link"</span><span class="p">:</span><span class="w"> </span><span class="s2">"http://example.com/"</span><span class="p">,</span><span class="w">
|
||
</span><span class="nt">"size"</span><span class="p">:</span><span class="w"> </span><span class="mi">15</span><span class="p">,</span><span class="w">
|
||
</span><span class="nt">"count"</span><span class="p">:</span><span class="w"> </span><span class="mf">1.2</span><span class="w">
|
||
</span><span class="p">}</span><span class="w">
|
||
</span></code></pre>
|
||
</div>
|
||
<p>The <code class="highlighter-rouge">schema</code> looks like <code class="highlighter-rouge">options</code> but describes how we should validate the user input. For example:</p>
|
||
<div class="language-json highlighter-rouge"><pre class="highlight"><code><span class="p">{</span><span class="w">
|
||
</span><span class="nt">"message"</span><span class="p">:</span><span class="w"> </span><span class="s2">"str"</span><span class="p">,</span><span class="w">
|
||
</span><span class="nt">"logins"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="w">
|
||
</span><span class="p">{</span><span class="w"> </span><span class="nt">"username"</span><span class="p">:</span><span class="w"> </span><span class="s2">"str"</span><span class="p">,</span><span class="w"> </span><span class="nt">"password"</span><span class="p">:</span><span class="w"> </span><span class="s2">"str"</span><span class="w"> </span><span class="p">}</span><span class="w">
|
||
</span><span class="p">],</span><span class="w">
|
||
</span><span class="nt">"random"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="s2">"match(^\w*$)"</span><span class="p">],</span><span class="w">
|
||
</span><span class="nt">"link"</span><span class="p">:</span><span class="w"> </span><span class="s2">"url"</span><span class="p">,</span><span class="w">
|
||
</span><span class="nt">"size"</span><span class="p">:</span><span class="w"> </span><span class="s2">"int(5,20)"</span><span class="p">,</span><span class="w">
|
||
</span><span class="nt">"count"</span><span class="p">:</span><span class="w"> </span><span class="s2">"float"</span><span class="p">,</span><span class="w">
|
||
</span><span class="nt">"not_need"</span><span class="p">:</span><span class="w"> </span><span class="s2">"str?"</span><span class="w">
|
||
</span><span class="p">}</span><span class="w">
|
||
</span></code></pre>
|
||
</div>
|
||
<p>We support:</p>
|
||
<ul>
|
||
<li>str</li>
|
||
<li>bool</li>
|
||
<li>int / int(min,) / int(,max) / int(min,max)</li>
|
||
<li>float / float(min,) / float(,max) / float(min,max)</li>
|
||
<li>email</li>
|
||
<li>url</li>
|
||
<li>port</li>
|
||
<li>match(REGEX)</li>
|
||
</ul>
|
||
<h2><a class="title-link" name="add-on-extended-build" href="#add-on-extended-build"></a> Add-on extended build</h2>
|
||
<p>Additional build options for an add-on is stored in <code class="highlighter-rouge">build.json</code>. This file will be read from our build systems.</p>
|
||
<div class="language-json highlighter-rouge"><pre class="highlight"><code><span class="p">{</span><span class="w">
|
||
</span><span class="nt">"build_from"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
|
||
</span><span class="nt">"armhf"</span><span class="p">:</span><span class="w"> </span><span class="s2">"homeassistant/armhf-base:latest"</span><span class="w">
|
||
</span><span class="p">},</span><span class="w">
|
||
</span><span class="nt">"squash"</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="p">,</span><span class="w">
|
||
</span><span class="nt">"args"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
|
||
</span><span class="nt">"my_build_arg"</span><span class="p">:</span><span class="w"> </span><span class="s2">"xy"</span><span class="w">
|
||
</span><span class="p">}</span><span class="w">
|
||
</span><span class="p">}</span><span class="w">
|
||
</span></code></pre>
|
||
</div>
|
||
<table>
|
||
<thead>
|
||
<tr>
|
||
<th>Key</th>
|
||
<th>Required</th>
|
||
<th>Description</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr>
|
||
<td>build_from</td>
|
||
<td>no</td>
|
||
<td>A dictionary with the hardware architecture as the key and the base Docker image as value.</td>
|
||
</tr>
|
||
<tr>
|
||
<td>squash</td>
|
||
<td>no</td>
|
||
<td>Default <code class="highlighter-rouge">False</code>. Be carfully with this option, you can not use the image for caching stuff after that!</td>
|
||
</tr>
|
||
<tr>
|
||
<td>args</td>
|
||
<td>no</td>
|
||
<td>Allow to set additional Docker build arguments as a dictionary.</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</article>
|
||
</div>
|
||
<aside id="sidebar" class="grid__item one-third lap-one-whole palm-one-whole">
|
||
<div class="grid">
|
||
<section class="aside-module grid__item one-whole lap-one-half">
|
||
<div class='edit-github'><a href='https://github.com/home-assistant/home-assistant.github.io/tree/current/source/developers/hassio/addon_config.markdown'>Edit this page on GitHub</a></div>
|
||
<div class='section'>
|
||
<h1 class="title delta">Development Guide</h1>
|
||
<ul class='divided sidebar-menu'>
|
||
<li>
|
||
<a href='/developers/'>Introduction </a>
|
||
<ul>
|
||
<li><a href='/developers/architecture/'>Architecture </a></li>
|
||
<li><a href='/developers/architecture_components/'>Components </a></li>
|
||
</ul>
|
||
</li>
|
||
<li>
|
||
<a href='/developers/development/'>Starting with Development </a>
|
||
<ul>
|
||
<li><a href='/developers/development_environment/'>Setting up Environment </a></li>
|
||
<li><a href='/developers/development_submitting/'>Submit your Work </a></li>
|
||
<li><a href='/developers/development_checklist/'>Checklist </a></li>
|
||
<li><a href='/developers/development_guidelines/'>Style guidelines </a></li>
|
||
<li><a href='/developers/development_testing/'>Testing </a></li>
|
||
<li><a href='/developers/development_catching_up/'>Catching up with Reality </a></li>
|
||
<li><a href='/developers/development_validation/'>Validation </a></li>
|
||
</ul>
|
||
</li>
|
||
<li>
|
||
<a href='/developers/development_101/'>Development 101 </a>
|
||
<ul>
|
||
<li><a href='/developers/development_hass_object/'>Hass object </a></li>
|
||
<li><a href='/developers/development_events/'>Events </a></li>
|
||
<li><a href='/developers/development_states/'>States </a></li>
|
||
<li><a href='/developers/development_services/'>Services </a></li>
|
||
<li><a href='/developers/development_config/'>Config </a></li>
|
||
</ul>
|
||
</li>
|
||
<li>
|
||
<a href='/developers/add_new_platform/'>Creating a new platform (to support a new device) </a>
|
||
<ul>
|
||
<li><a href='/developers/code_review_platform/'>Checklist creating a platform </a></li>
|
||
<li><a href='/developers/platform_example_sensor/'>Example sensor platform </a></li>
|
||
<li><a href='/developers/platform_example_light/'>Example light platform </a></li>
|
||
</ul>
|
||
</li>
|
||
<li>
|
||
<a href='/developers/creating_components/'>Adding a new component </a>
|
||
<ul>
|
||
<li><a href='/developers/code_review_component/'>Checklist creating a component </a></li>
|
||
<li><a href='/developers/component_loading/'>Loading components </a></li>
|
||
<li><a href='/developers/component_deps_and_reqs/'>Requirements & Dependencies </a></li>
|
||
<li><a href='/developers/component_events/'>Handling events </a></li>
|
||
<li><a href='/developers/component_states/'>States </a></li>
|
||
<li><a href='/developers/component_visibility/'>Visibility </a></li>
|
||
<li><a href='/developers/component_generic_discovery/'>Loading Platforms </a></li>
|
||
<li><a href='/developers/component_discovery/'>Component Discovery </a></li>
|
||
</ul>
|
||
</li>
|
||
<li>
|
||
<a href='/developers/intent/'>Intents (handling voice responses) </a>
|
||
<ul>
|
||
<li><a href='/developers/intent/firing/'>Firing intents </a></li>
|
||
<li><a href='/developers/intent/handling/'>Handling intents </a></li>
|
||
<li><a href='/developers/intent/conversation/'>Registering sentences </a></li>
|
||
</ul>
|
||
</li>
|
||
<li>
|
||
<a href='/developers/asyncio/'>Asynchronous Programming </a>
|
||
<ul>
|
||
<li><a href='/developers/asyncio_101/'>Introduction to asyncio </a></li>
|
||
<li><a href='/developers/asyncio_categorizing_functions/'>Categorizing Functions </a></li>
|
||
<li><a href='/developers/asyncio_working_with_async/'>Working with Async </a></li>
|
||
<li><a href='/developers/asyncio_misc/'>Miscellaneous </a></li>
|
||
</ul>
|
||
</li>
|
||
<li>
|
||
<a href='/developers/frontend/'>Frontend Development </a>
|
||
<ul>
|
||
<li><a href='/developers/frontend_add_card/'>Add State Card </a></li>
|
||
<li><a href='/developers/frontend_add_more_info/'>Add More Info Dialog </a></li>
|
||
<li><a href='/developers/frontend_creating_custom_panels/'>Add Custom Panels </a></li>
|
||
<li><a href='/developers/frontend_creating_custom_ui/'>Add Custom UI </a></li>
|
||
<li><a href='/developers/frontend_translation/'>Translation </a></li>
|
||
</ul>
|
||
</li>
|
||
<li>
|
||
<a href='/developers/hassio/architecture/'>Hass.io architecture </a>
|
||
<ul>
|
||
<li><a href='/developers/hassio/debugging/'>Debugging Hass.io </a></li>
|
||
</ul>
|
||
</li>
|
||
<li>
|
||
<a href='/developers/hassio/addon_development/'>Hass.io Add-on Development </a>
|
||
<ul>
|
||
<li><a href='/developers/hassio/addon_tutorial/'>Tutorial: Making your first add-on </a></li>
|
||
<li><a class='active' href='/developers/hassio/addon_config/'>Configuration </a></li>
|
||
<li><a href='/developers/hassio/addon_communication/'>Communication </a></li>
|
||
<li><a href='/developers/hassio/addon_testing/'>Local Testing </a></li>
|
||
<li><a href='/developers/hassio/addon_publishing/'>Publishing </a></li>
|
||
<li><a href='/developers/hassio/addon_repository/'>Repositories </a></li>
|
||
</ul>
|
||
</li>
|
||
<li>
|
||
<a href='/developers/api/'>API </a>
|
||
<ul>
|
||
<li><a href='https://dev-docs.home-assistant.io/en/dev/'>Python API </a></li>
|
||
<li><a href='/developers/websocket_api/'>Websocket API </a></li>
|
||
<li><a href='/developers/rest_api/'>REST API </a></li>
|
||
<li><a href='/developers/python_api/'>Python REST API </a></li>
|
||
<li><a href='/developers/server_sent_events/'>Server-sent events </a></li>
|
||
</ul>
|
||
</li>
|
||
<li>
|
||
<a href='/developers/documentation/'>Website/Documentation </a>
|
||
<ul>
|
||
<li><a href='/developers/documentation/standards/'>Standards </a></li>
|
||
<li><a href='/developers/documentation/create_page/'>Create a new page </a></li>
|
||
</ul>
|
||
</li>
|
||
<li><a href='/developers/helpers/'>Online helpers </a></li>
|
||
<li><a href='/developers/releasing/'>Releasing </a></li>
|
||
<li><a href='/developers/maintenance/'>Maintenance </a></li>
|
||
<li>
|
||
Governance
|
||
<ul>
|
||
<li><a href='/developers/cla/'>Contributor License Agreement </a></li>
|
||
<li><a href='/privacy/'>Privacy Policy </a></li>
|
||
<li><a href='/tos/'>Terms of Service </a></li>
|
||
<li><a href='/code_of_conduct/'>Code of Conduct </a></li>
|
||
<li><a href='/developers/credits/'>Credits </a></li>
|
||
<li><a href='/developers/license/'>License </a></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
</section>
|
||
</div>
|
||
</aside>
|
||
</div>
|
||
</div>
|
||
<footer>
|
||
<div class="grid-wrapper">
|
||
<div class="grid">
|
||
<div class="grid__item">
|
||
<div class="copyright">
|
||
<a rel="me" href='https://twitter.com/home_assistant'><i class="icon-twitter"></i></a>
|
||
<a rel="me" href='https://facebook.com/homeassistantio'><i class="icon-facebook"></i></a>
|
||
<a rel="me" href='https://plus.google.com/110560654828510104551'><i class="icon-google-plus"></i></a>
|
||
<a rel="me" href='https://github.com/home-assistant/home-assistant'><i class="icon-github"></i></a>
|
||
<div class="credit">
|
||
Contact us at <a href='mailto:hello@home-assistant.io'>hello@home-assistant.io</a> (no support!).<br>
|
||
Website powered by <a href='http://jekyllrb.com/'>Jekyll</a> and the <a href='https://github.com/coogie/oscailte'>Oscalite theme</a>.<br />
|
||
Hosted by <a href='https://pages.github.com/'>GitHub</a> and served by <a href='https://cloudflare.com'>CloudFlare</a>.
|
||
</div>
|
||
<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png" /></a><br /><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">home-assistant.io</span> is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/">Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License</a>.
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</footer>
|
||
<script>
|
||
var _gaq=[['_setAccount','UA-57927901-1'],['_trackPageview']];
|
||
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
|
||
g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
|
||
s.parentNode.insertBefore(g,s)}(document,'script'));
|
||
</script>
|
||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/2/docsearch.min.css" />
|
||
<script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/2/docsearch.min.js"></script>
|
||
<script type="text/javascript">
|
||
docsearch({
|
||
apiKey: 'ae96d94b201c5444c8a443093edf3efb',
|
||
indexName: 'home-assistant',
|
||
inputSelector: '#search',
|
||
debug: false // Set debug to true if you want to inspect the dropdown
|
||
});
|
||
document.querySelector('.search .close').addEventListener('click', function(ev) {
|
||
ev.preventDefault();
|
||
document.querySelector('.search-container').style.display = 'none';
|
||
});
|
||
document.querySelector('.show-search').addEventListener('click', function(ev) {
|
||
ev.preventDefault();
|
||
document.querySelector('.search-container').style.display = 'block';
|
||
document.getElementById('toggle').checked = false;
|
||
document.querySelector('.search-container input').focus();
|
||
});
|
||
</script>
|
||
</body>
|
||
</html>
|