Site updated at 2017-05-28 17:47:20 UTC
This commit is contained in:
parent
af7b503546
commit
39e60ce9d2
50 changed files with 130 additions and 117 deletions
2
atom.xml
2
atom.xml
|
@ -4,7 +4,7 @@
|
|||
<title><![CDATA[Home Assistant]]></title>
|
||||
<link href="https://home-assistant.io/atom.xml" rel="self"/>
|
||||
<link href="https://home-assistant.io/"/>
|
||||
<updated>2017-05-28T17:32:41+00:00</updated>
|
||||
<updated>2017-05-28T17:42:56+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Home Assistant]]></name>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<title><![CDATA[Category: Announcements | Home Assistant]]></title>
|
||||
<link href="https://home-assistant.io/blog/categories/announcements/atom.xml" rel="self"/>
|
||||
<link href="https://home-assistant.io/"/>
|
||||
<updated>2017-05-28T17:32:41+00:00</updated>
|
||||
<updated>2017-05-28T17:42:56+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Home Assistant]]></name>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<title><![CDATA[Category: Community | Home Assistant]]></title>
|
||||
<link href="https://home-assistant.io/blog/categories/community/atom.xml" rel="self"/>
|
||||
<link href="https://home-assistant.io/"/>
|
||||
<updated>2017-05-28T17:32:41+00:00</updated>
|
||||
<updated>2017-05-28T17:42:56+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Home Assistant]]></name>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<title><![CDATA[Category: Device-Tracking | Home Assistant]]></title>
|
||||
<link href="https://home-assistant.io/blog/categories/device-tracking/atom.xml" rel="self"/>
|
||||
<link href="https://home-assistant.io/"/>
|
||||
<updated>2017-05-28T17:32:41+00:00</updated>
|
||||
<updated>2017-05-28T17:42:56+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Home Assistant]]></name>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<title><![CDATA[Category: ESP8266 | Home Assistant]]></title>
|
||||
<link href="https://home-assistant.io/blog/categories/esp8266/atom.xml" rel="self"/>
|
||||
<link href="https://home-assistant.io/"/>
|
||||
<updated>2017-05-28T17:32:41+00:00</updated>
|
||||
<updated>2017-05-28T17:42:56+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Home Assistant]]></name>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<title><![CDATA[Category: How-To | Home Assistant]]></title>
|
||||
<link href="https://home-assistant.io/blog/categories/how-to/atom.xml" rel="self"/>
|
||||
<link href="https://home-assistant.io/"/>
|
||||
<updated>2017-05-28T17:32:41+00:00</updated>
|
||||
<updated>2017-05-28T17:42:56+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Home Assistant]]></name>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<title><![CDATA[Category: iBeacons | Home Assistant]]></title>
|
||||
<link href="https://home-assistant.io/blog/categories/ibeacons/atom.xml" rel="self"/>
|
||||
<link href="https://home-assistant.io/"/>
|
||||
<updated>2017-05-28T17:32:41+00:00</updated>
|
||||
<updated>2017-05-28T17:42:56+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Home Assistant]]></name>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<title><![CDATA[Category: Internet-of-Things | Home Assistant]]></title>
|
||||
<link href="https://home-assistant.io/blog/categories/internet-of-things/atom.xml" rel="self"/>
|
||||
<link href="https://home-assistant.io/"/>
|
||||
<updated>2017-05-28T17:32:41+00:00</updated>
|
||||
<updated>2017-05-28T17:42:56+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Home Assistant]]></name>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<title><![CDATA[Category: IoT-Data | Home Assistant]]></title>
|
||||
<link href="https://home-assistant.io/blog/categories/iot-data/atom.xml" rel="self"/>
|
||||
<link href="https://home-assistant.io/"/>
|
||||
<updated>2017-05-28T17:32:41+00:00</updated>
|
||||
<updated>2017-05-28T17:42:56+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Home Assistant]]></name>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<title><![CDATA[Category: Merchandise | Home Assistant]]></title>
|
||||
<link href="https://home-assistant.io/blog/categories/merchandise/atom.xml" rel="self"/>
|
||||
<link href="https://home-assistant.io/"/>
|
||||
<updated>2017-05-28T17:32:41+00:00</updated>
|
||||
<updated>2017-05-28T17:42:56+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Home Assistant]]></name>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<title><![CDATA[Category: Micropython | Home Assistant]]></title>
|
||||
<link href="https://home-assistant.io/blog/categories/micropython/atom.xml" rel="self"/>
|
||||
<link href="https://home-assistant.io/"/>
|
||||
<updated>2017-05-28T17:32:41+00:00</updated>
|
||||
<updated>2017-05-28T17:42:56+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Home Assistant]]></name>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<title><![CDATA[Category: MQTT | Home Assistant]]></title>
|
||||
<link href="https://home-assistant.io/blog/categories/mqtt/atom.xml" rel="self"/>
|
||||
<link href="https://home-assistant.io/"/>
|
||||
<updated>2017-05-28T17:32:41+00:00</updated>
|
||||
<updated>2017-05-28T17:42:56+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Home Assistant]]></name>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<title><![CDATA[Category: Organisation | Home Assistant]]></title>
|
||||
<link href="https://home-assistant.io/blog/categories/organisation/atom.xml" rel="self"/>
|
||||
<link href="https://home-assistant.io/"/>
|
||||
<updated>2017-05-28T17:32:41+00:00</updated>
|
||||
<updated>2017-05-28T17:42:56+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Home Assistant]]></name>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<title><![CDATA[Category: OwnTracks | Home Assistant]]></title>
|
||||
<link href="https://home-assistant.io/blog/categories/owntracks/atom.xml" rel="self"/>
|
||||
<link href="https://home-assistant.io/"/>
|
||||
<updated>2017-05-28T17:32:41+00:00</updated>
|
||||
<updated>2017-05-28T17:42:56+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Home Assistant]]></name>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<title><![CDATA[Category: Presence-Detection | Home Assistant]]></title>
|
||||
<link href="https://home-assistant.io/blog/categories/presence-detection/atom.xml" rel="self"/>
|
||||
<link href="https://home-assistant.io/"/>
|
||||
<updated>2017-05-28T17:32:41+00:00</updated>
|
||||
<updated>2017-05-28T17:42:56+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Home Assistant]]></name>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<title><![CDATA[Category: Public-Service-Announcement | Home Assistant]]></title>
|
||||
<link href="https://home-assistant.io/blog/categories/public-service-announcement/atom.xml" rel="self"/>
|
||||
<link href="https://home-assistant.io/"/>
|
||||
<updated>2017-05-28T17:32:41+00:00</updated>
|
||||
<updated>2017-05-28T17:42:56+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Home Assistant]]></name>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<title><![CDATA[Category: Release-Notes | Home Assistant]]></title>
|
||||
<link href="https://home-assistant.io/blog/categories/release-notes/atom.xml" rel="self"/>
|
||||
<link href="https://home-assistant.io/"/>
|
||||
<updated>2017-05-28T17:32:41+00:00</updated>
|
||||
<updated>2017-05-28T17:42:56+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Home Assistant]]></name>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<title><![CDATA[Category: Survey | Home Assistant]]></title>
|
||||
<link href="https://home-assistant.io/blog/categories/survey/atom.xml" rel="self"/>
|
||||
<link href="https://home-assistant.io/"/>
|
||||
<updated>2017-05-28T17:32:41+00:00</updated>
|
||||
<updated>2017-05-28T17:42:56+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Home Assistant]]></name>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<title><![CDATA[Category: Talks | Home Assistant]]></title>
|
||||
<link href="https://home-assistant.io/blog/categories/talks/atom.xml" rel="self"/>
|
||||
<link href="https://home-assistant.io/"/>
|
||||
<updated>2017-05-28T17:32:41+00:00</updated>
|
||||
<updated>2017-05-28T17:42:56+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Home Assistant]]></name>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<title><![CDATA[Category: Technology | Home Assistant]]></title>
|
||||
<link href="https://home-assistant.io/blog/categories/technology/atom.xml" rel="self"/>
|
||||
<link href="https://home-assistant.io/"/>
|
||||
<updated>2017-05-28T17:32:41+00:00</updated>
|
||||
<updated>2017-05-28T17:42:56+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Home Assistant]]></name>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<title><![CDATA[Category: User-Stories | Home Assistant]]></title>
|
||||
<link href="https://home-assistant.io/blog/categories/user-stories/atom.xml" rel="self"/>
|
||||
<link href="https://home-assistant.io/"/>
|
||||
<updated>2017-05-28T17:32:41+00:00</updated>
|
||||
<updated>2017-05-28T17:42:56+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Home Assistant]]></name>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<title><![CDATA[Category: Video | Home Assistant]]></title>
|
||||
<link href="https://home-assistant.io/blog/categories/video/atom.xml" rel="self"/>
|
||||
<link href="https://home-assistant.io/"/>
|
||||
<updated>2017-05-28T17:32:41+00:00</updated>
|
||||
<updated>2017-05-28T17:42:56+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Home Assistant]]></name>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<title><![CDATA[Category: Website | Home Assistant]]></title>
|
||||
<link href="https://home-assistant.io/blog/categories/website/atom.xml" rel="self"/>
|
||||
<link href="https://home-assistant.io/"/>
|
||||
<updated>2017-05-28T17:32:41+00:00</updated>
|
||||
<updated>2017-05-28T17:42:56+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Home Assistant]]></name>
|
||||
|
|
|
@ -79,7 +79,7 @@
|
|||
<p>To enable this platform, add the following lines to your <code class="highlighter-rouge">configuration.yaml</code>:</p>
|
||||
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example configuration.yaml entry</span>
|
||||
<span class="s">alarm_control_panel</span><span class="pi">:</span>
|
||||
<span class="s">platform</span><span class="pi">:</span> <span class="s">mqtt</span>
|
||||
<span class="pi">-</span> <span class="s">platform</span><span class="pi">:</span> <span class="s">mqtt</span>
|
||||
<span class="s">state_topic</span><span class="pi">:</span> <span class="s2">"</span><span class="s">home/alarm"</span>
|
||||
<span class="s">command_topic</span><span class="pi">:</span> <span class="s2">"</span><span class="s">home/alarm/set"</span>
|
||||
</code></pre>
|
||||
|
|
|
@ -88,16 +88,16 @@
|
|||
<li>Select name, language (if you are planning to use it with Google Actions check <a href="https://support.google.com/assistant/answer/7108196?hl=en">here</a> supported languages) and time zone</li>
|
||||
<li>Click “Save”</li>
|
||||
<li>Go to “Fullfiment” (in the left menu)</li>
|
||||
<li>Enable Webhook and set your HA url with the apiai endpoint. Eg.: <code class="highlighter-rouge">https://myhome.duckdns.org/api/apiai?api_password=HA_PASSWORD</code></li>
|
||||
<li>Enable Webhook and set your Home Assistant URL with the Api.ai endpoint. Eg.: <code class="highlighter-rouge">https://myhome.duckdns.org/api/apiai?api_password=HA_PASSWORD</code></li>
|
||||
<li>Click “Save”</li>
|
||||
<li>Create a new intent</li>
|
||||
<li>Below “User says” write one phrase that you, the user, will tell Api.ai. Eg.: Which is the temperature at home?</li>
|
||||
<li>In “Action” set some key (this will be the bind with HA config), eg.: GetTemperature</li>
|
||||
<li>In “Response” set “Cannot connect to HA or it is taking to long” (fall back response)</li>
|
||||
<li>In “Action” set some key (this will be the bind with Home Assistant configuration), eg.: GetTemperature</li>
|
||||
<li>In “Response” set “Cannot connect to Home Assistant or it is taking to long” (fall back response)</li>
|
||||
<li>At the end of the page, click on “Fulfillment” and check “Use webhook”</li>
|
||||
<li>Click “Save”</li>
|
||||
<li>On the top right, where is written “Try it now…”, write, or say, the phrase you have previously defined and hit enter</li>
|
||||
<li>Api.ai has send a request to your HA server</li>
|
||||
<li>Api.ai has send a request to your Home Assistant server</li>
|
||||
</ul>
|
||||
<p>Take a look to “Integrations”, in the left menu, to configure third parties.</p>
|
||||
<h3><a class="title-link" name="configuring-home-assistant" href="#configuring-home-assistant"></a> Configuring Home Assistant</h3>
|
||||
|
@ -122,7 +122,7 @@
|
|||
<ul>
|
||||
<li><strong>speech</strong> (<em>Optional</em>): Text or template to return to Api.ai</li>
|
||||
<li><strong>action</strong> (<em>Optional</em>): Script definition</li>
|
||||
<li><strong>async_action</strong> (<em>Optional</em>): If HA should execute the action asynchronously (returning response to Api.ai without waiting the action to finish). Should be set to <code class="highlighter-rouge">True</code> if Api.ai is returning the “Cannot connect to HA or it is taking to long” message, but then you will not be able to use values based on the result of the action. Defaults to <code class="highlighter-rouge">False</code>.</li>
|
||||
<li><strong>async_action</strong> (<em>Optional</em>): If Home Assistant should execute the action asynchronously (returning response to Api.ai without waiting the action to finish). Should be set to <code class="highlighter-rouge">True</code> if Api.ai is returning the “Cannot connect to Home Assistant or it is taking to long” message, but then you will not be able to use values based on the result of the action. Defaults to <code class="highlighter-rouge">False</code>.</li>
|
||||
</ul>
|
||||
<h2><a class="title-link" name="examples" href="#examples"></a> Examples</h2>
|
||||
<p>Download <a href="https://github.com/home-assistant/home-assistant.github.io/blob/next/source/assets/HomeAssistant_APIAI.zip">this zip</a> and load it in your Api.ai agent (Settings -> Export and Import) for examples intents to use with this configuration:</p>
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
<li><strong>device_class</strong> (<em>Optional</em>): The <a href="/components/binary_sensor/">type/class</a> of the sensor to set the icon in the frontend.</li>
|
||||
<li><strong>payload_on</strong> (<em>Optional</em>): The payload that represents enabled state. Default is “ON”.</li>
|
||||
<li><strong>payload_off</strong> (<em>Optional</em>): The payload that represents disabled state. Default is “OFF”.</li>
|
||||
<li><strong>value_template</strong> (<em>Optional</em>): Defines a <a href="/topics/templating/">template</a> to extract a value from the payload.</li>
|
||||
<li><strong>value_template</strong> (<em>Optional</em>): Defines a <a href="/docs/configuration/templating/#processing-incoming-data">template</a> to extract a value from the payload.</li>
|
||||
</ul>
|
||||
<h2><a class="title-link" name="examples" href="#examples"></a> Examples</h2>
|
||||
<p>In this section you find some real life examples of how to use this sensor.</p>
|
||||
|
@ -110,7 +110,7 @@
|
|||
</div>
|
||||
<p>An alternative solution could look like this:</p>
|
||||
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="s">binary_sensor</span><span class="pi">:</span>
|
||||
<span class="s">platform</span><span class="pi">:</span> <span class="s">command_line</span>
|
||||
<span class="pi">-</span> <span class="s">platform</span><span class="pi">:</span> <span class="s">command_line</span>
|
||||
<span class="s">name</span><span class="pi">:</span> <span class="s">Printer</span>
|
||||
<span class="s">command</span><span class="pi">:</span> <span class="s">ping -W 1 -c 1 192.168.1.10 > /dev/null 2>&1 && echo success || echo fail</span>
|
||||
<span class="s">device_class</span><span class="pi">:</span> <span class="s">connectivity</span>
|
||||
|
@ -118,6 +118,7 @@
|
|||
<span class="s">payload_off</span><span class="pi">:</span> <span class="s2">"</span><span class="s">fail"</span>
|
||||
</code></pre>
|
||||
</div>
|
||||
<p>Consider to use the <a href="/components/binary_sensor.ping/"><code class="highlighter-rouge">ping</code> sensor </a> as an alternative to the samples above.</p>
|
||||
</article>
|
||||
</div>
|
||||
<aside id="sidebar" class="grid__item one-third lap-one-whole palm-one-whole">
|
||||
|
|
|
@ -82,7 +82,7 @@
|
|||
<li><strong>payload_on</strong> (<em>Optional</em>): The payload that represents on state. Default is “ON”.</li>
|
||||
<li><strong>payload_off</strong> (<em>Optional</em>): The payload that represents state. Default is “OFF”.</li>
|
||||
<li><strong>device_class</strong> (<em>Optional</em>): The <a href="/components/binary_sensor/">type/class</a> of the sensor to set the icon in the frontend.</li>
|
||||
<li><strong>value_template</strong> (<em>Optional</em>): Defines a <a href="/topics/templating/">template</a> to extract a value from the payload.</li>
|
||||
<li><strong>value_template</strong> (<em>Optional</em>): Defines a <a href="/docs/configuration/templating/#processing-incoming-data">template</a> to extract a value from the payload.</li>
|
||||
</ul>
|
||||
<p>For a quick check you can use the commandline tools shipped with <code class="highlighter-rouge">mosquitto</code> to send MQTT messages. Set the state of a sensor manually:</p>
|
||||
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>mosquitto_pub -h 127.0.0.1 -t home-assistant/window/contact -m <span class="s2">"OFF"</span>
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
</header>
|
||||
<hr class="divider">
|
||||
<p>The <code class="highlighter-rouge">rest</code> binary sensor platform is consuming a given endpoint which is exposed by a <a href="https://en.wikipedia.org/wiki/Representational_state_transfer">RESTful API</a> of a device, an application, or a web service. The binary sensor has support for GET and POST requests.</p>
|
||||
<p>The JSON messages can contain different values like <code class="highlighter-rouge">1</code>, <code class="highlighter-rouge">"1"</code>, <code class="highlighter-rouge">TRUE</code>, <code class="highlighter-rouge">true</code>, <code class="highlighter-rouge">on</code>, or <code class="highlighter-rouge">open</code>. If the value is nested then use a <a href="/topics/templating/">template</a>.</p>
|
||||
<p>The JSON messages can contain different values like <code class="highlighter-rouge">1</code>, <code class="highlighter-rouge">"1"</code>, <code class="highlighter-rouge">TRUE</code>, <code class="highlighter-rouge">true</code>, <code class="highlighter-rouge">on</code>, or <code class="highlighter-rouge">open</code>. If the value is nested then use a <a href="/docs/configuration/templating/#processing-incoming-data">template</a>.</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">"Binary sensor"</span><span class="p">,</span><span class="w">
|
||||
</span><span class="nt">"state"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
|
||||
|
@ -98,7 +98,7 @@
|
|||
<li><strong>method</strong> (<em>Optional</em>): The method of the request. Default is GET.</li>
|
||||
<li><strong>name</strong> (<em>Optional</em>): Name of the REST binary sensor.</li>
|
||||
<li><strong>device_class</strong> (<em>Optional</em>): The <a href="/components/binary_sensor/">type/class</a> of the sensor to set the icon in the frontend.</li>
|
||||
<li><strong>value_template</strong> (<em>Optional</em>): Defines a <a href="/topics/templating/">template</a> to extract the value.</li>
|
||||
<li><strong>value_template</strong> (<em>Optional</em>): Defines a <a href="/docs/configuration/templating/#processing-incoming-data">template</a> to extract the value.</li>
|
||||
<li><strong>payload</strong> (<em>Optional</em>): The payload to send with a POST request. Usually formed as a dictionary.</li>
|
||||
<li><strong>verify_ssl</strong> (<em>Optional</em>): Verify the certification of the endpoint. Default to True.</li>
|
||||
<li><strong>authentication</strong> (<em>Optional</em>): Type of the HTTP authentication. <code class="highlighter-rouge">basic</code> or <code class="highlighter-rouge">digest</code>.</li>
|
||||
|
|
|
@ -87,7 +87,7 @@
|
|||
<li><strong>payload</strong> (<em>Required</em>): What to send to the host in order to get the response we’re interested in.</li>
|
||||
<li><strong>value_on</strong> (<em>Required</em>): The value returned when the device is “on”.</li>
|
||||
<li><strong>timeout</strong> (<em>Optional</em>): How long in seconds to wait for a response from the service before giving up and disconnecting. Defaults to 10.</li>
|
||||
<li><strong>value_template</strong> (<em>Optional</em>): Defines a <a href="/topics/templating/">template</a> to extract the value. By default it’s assumed that the entire response is the value.</li>
|
||||
<li><strong>value_template</strong> (<em>Optional</em>): Defines a <a href="/docs/configuration/templating/#processing-incoming-data">template</a> to extract the value. By default it’s assumed that the entire response is the value.</li>
|
||||
<li><strong>buffer_size</strong> (<em>Optional</em>): The size of the receive buffer in bytes. Set this to a larger value if you expect to receive a response larger than the default. Defaults to 1024.</li>
|
||||
</ul>
|
||||
</article>
|
||||
|
|
|
@ -81,8 +81,8 @@
|
|||
<li><strong>name</strong> (<em>Optional</em>): This parameter allows you to override the name of your camera.</li>
|
||||
<li><strong>username</strong> (<em>Optional</em>): The username for accessing your camera.</li>
|
||||
<li><strong>password</strong> (<em>Optional</em>): The password for accessing your camera.</li>
|
||||
<li><strong>authentication</strong> (<em>Optional</em>): <code class="highlighter-rouge">basic</code> (default) or <code class="highlighter-rouge">digest</code> auth for requests.</li>
|
||||
<li><strong>limit_refetch_to_url_change</strong> (<em>Optional</em>): true/false value (default: false). Limits refetching of the remote image to when the url changes. Only relevant if using a template to fetch the remote image.</li>
|
||||
<li><strong>authentication</strong> (<em>Optional</em>): Type for authenticating the requests <code class="highlighter-rouge">basic</code> (default) or <code class="highlighter-rouge">digest</code>.</li>
|
||||
<li><strong>limit_refetch_to_url_change</strong> (<em>Optional</em>): True/false value (default: false). Limits refetching of the remote image to when the url changes. Only relevant if using a template to fetch the remote image.</li>
|
||||
</ul>
|
||||
<p class="img">
|
||||
<a href="/cookbook/google_maps_card/">
|
||||
|
|
|
@ -93,7 +93,7 @@ state from <code class="highlighter-rouge">state_topic</code>. If these messages
|
|||
<li><strong>optimistic</strong> (<em>Optional</em>): Flag that defines if switch works in optimistic mode. Default is <code class="highlighter-rouge">true</code> if no state topic defined, else <code class="highlighter-rouge">false</code>.</li>
|
||||
<li><strong>qos</strong> (<em>Optional</em>): The maximum QoS level of the state topic. Default is <code class="highlighter-rouge">0</code>. Will also be used when publishing messages.</li>
|
||||
<li><strong>retain</strong> (<em>Optional</em>): If the published message should have the retain flag on or not. Default is <code class="highlighter-rouge">false</code>.</li>
|
||||
<li><strong>value_template</strong> (<em>Optional</em>): Defines a <a href="/topics/templating/">template</a> to extract a value from the payload.</li>
|
||||
<li><strong>value_template</strong> (<em>Optional</em>): Defines a <a href="/docs/configuration/templating/#processing-incoming-data">template</a> to extract a value from the payload.</li>
|
||||
<li><strong>tilt_command_topic</strong> (<em>Optional</em>): The MQTT topic to publish commands to control the cover tilt.</li>
|
||||
<li><strong>tilt_status_topic</strong> (<em>Optional</em>): The MQTT topic subscribed to receive tilt status update values.</li>
|
||||
<li><strong>tilt_min</strong> (<em>Optional</em>): The minimum tilt value. Default is <code class="highlighter-rouge">0</code></li>
|
||||
|
|
|
@ -85,7 +85,7 @@
|
|||
<li><strong>state_topic</strong> (<em>Optional</em>): The MQTT topic subscribed to receive state updates.</li>
|
||||
<li><strong>payload_on</strong> (<em>Optional</em>): The payload that represents the running state. Default is “ON”.</li>
|
||||
<li><strong>payload_off</strong> (<em>Optional</em>): The payload that represents the stop state. Default is “OFF”.</li>
|
||||
<li><strong>state_value_template</strong> (<em>Optional</em>): Defines a <a href="/topics/templating/">template</a> to extract a value from the state.</li>
|
||||
<li><strong>state_value_template</strong> (<em>Optional</em>): Defines a <a href="/docs/configuration/templating/#processing-incoming-data">template</a> to extract a value from the state.</li>
|
||||
<li><strong>qos</strong> (<em>Optional</em>): The maximum QoS level of the state topic. Default is 0 and will also be used to publishing messages.</li>
|
||||
<li><strong>optimistic</strong> (<em>Optional</em>): Flag that defines if lock works in optimistic mode. Default is <code class="highlighter-rouge">true</code> if no state topic defined, else <code class="highlighter-rouge">false</code>.</li>
|
||||
<li><strong>retain</strong> (<em>Optional</em>): If the published message should have the retain flag on or not.</li>
|
||||
|
@ -93,13 +93,13 @@
|
|||
<li><strong>oscillation_command_topic</strong> (<em>Optional</em>): The MQTT topic to publish commands to change the oscillation state.</li>
|
||||
<li><strong>payload_oscillation_on</strong> (<em>Optional</em>): The payload that represents the oscillation on state. Default is “oscillate_on”.</li>
|
||||
<li><strong>payload_oscillation_off</strong> (<em>Optional</em>): The payload that presents the oscillation off state. Default is “oscillate_off”.</li>
|
||||
<li><strong>oscillation_value_template</strong> (<em>Optional</em>): Defines a <a href="/topics/templating/">template</a> to extract a value from the oscillation.</li>
|
||||
<li><strong>oscillation_value_template</strong> (<em>Optional</em>): Defines a <a href="/docs/configuration/templating/#processing-incoming-data">template</a> to extract a value from the oscillation.</li>
|
||||
<li><strong>speed_state_topic</strong> (<em>Optional</em>): The MQTT topic subscribed to receive speed state updates.</li>
|
||||
<li><strong>speed_command_topic</strong> (<em>Optional</em>): The MQTT topic to publish commands to change speed state.</li>
|
||||
<li><strong>payload_low_speed</strong> (<em>Optional</em>): The payload that represents the fan’s low speed.</li>
|
||||
<li><strong>payload_medium_speed</strong> (<em>Optional</em>): The payload that represents the fan’s medium speed.</li>
|
||||
<li><strong>payload_high_speed</strong> (<em>Optional</em>): The payload that represents the fan’s high speed.</li>
|
||||
<li><strong>speed_value_template</strong> (<em>Optional</em>): Defines a <a href="/topics/templating/">template</a> to extract a value from the speed payload.</li>
|
||||
<li><strong>speed_value_template</strong> (<em>Optional</em>): Defines a <a href="/docs/configuration/templating/#processing-incoming-data">template</a> to extract a value from the speed payload.</li>
|
||||
<li><strong>speeds</strong> array (<em>Optional</em>): Valid entries for the list are <code class="highlighter-rouge">off</code>, <code class="highlighter-rouge">low</code>, <code class="highlighter-rouge">medium</code>, and <code class="highlighter-rouge">high</code>.</li>
|
||||
</ul>
|
||||
<p class="note warning">
|
||||
|
|
|
@ -82,13 +82,13 @@
|
|||
<li><strong>brightness_command_topic</strong> (<em>Optional</em>): The MQTT topic to publish commands to change the light’s brightness.</li>
|
||||
<li><strong>brightness_scale</strong> (<em>Optional</em>): Defines the maximum brightness value (i.e. 100%) of the MQTT device (defaults to 255).</li>
|
||||
<li><strong>brightness_state_topic</strong> (<em>Optional</em>): The MQTT topic subscribed to receive brightness state updates.</li>
|
||||
<li><strong>brightness_value_template</strong> (<em>Optional</em>): Defines a <a href="/topics/templating/">template</a> to extract the brightness value.</li>
|
||||
<li><strong>brightness_value_template</strong> (<em>Optional</em>): Defines a <a href="/docs/configuration/templating/#processing-incoming-data">template</a> to extract the brightness value.</li>
|
||||
<li><strong>color_temp_command_topic</strong> (<em>Optional</em>): The MQTT topic to publish commands to change the light’s color temperature state. The color temperature command slider has a range of 157 to 500 mireds (micro reciprocal degrees).</li>
|
||||
<li><strong>color_temp_state_topic</strong> (<em>Optional</em>): The MQTT topic subscribed to receive color temperature state updates.</li>
|
||||
<li><strong>color_temp_value_template</strong> (<em>Optional</em>): Defines a <a href="/topics/templating/">template</a> to extract the color temperature value.</li>
|
||||
<li><strong>effect_command_topic</strong> (<em>Optional</em>): The MQTT topic to publish commands to change the light’s effect state.</li>
|
||||
<li><strong>effect_state_topic</strong> (<em>Optional</em>): The MQTT topic subscribed to receive effect state updates.</li>
|
||||
<li><strong>effect_value_template</strong> (<em>Optional</em>): Defines a <a href="/topics/templating/">template</a> to extract the effect value.</li>
|
||||
<li><strong>effect_value_template</strong> (<em>Optional</em>): Defines a <a href="/docs/configuration/templating/#processing-incoming-data">template</a> to extract the effect value.</li>
|
||||
<li><strong>effect_list</strong> (<em>Optional</em>): The list of effects the light supports.</li>
|
||||
<li><strong>name</strong> (<em>Optional</em>): The name of the switch. Default is ‘MQTT Switch’.</li>
|
||||
<li><strong>optimistic</strong> (<em>Optional</em>): Flag that defines if switch works in optimistic mode. Default is true if no state topic defined, else false.</li>
|
||||
|
@ -98,15 +98,15 @@
|
|||
<li><strong>retain</strong> (<em>Optional</em>): If the published message should have the retain flag on or not.</li>
|
||||
<li><strong>rgb_command_topic</strong> (<em>Optional</em>): The MQTT topic to publish commands to change the light’s RGB state.</li>
|
||||
<li><strong>rgb_state_topic</strong> (<em>Optional</em>): The MQTT topic subscribed to receive RGB state updates.</li>
|
||||
<li><strong>rgb_value_template</strong> (<em>Optional</em>): Defines a <a href="/topics/templating/">template</a> to extract the RGB value.</li>
|
||||
<li><strong>rgb_value_template</strong> (<em>Optional</em>): Defines a <a href="/docs/configuration/templating/#processing-incoming-data">template</a> to extract the RGB value.</li>
|
||||
<li><strong>state_topic</strong> (<em>Optional</em>): The MQTT topic subscribed to receive state updates.</li>
|
||||
<li><strong>state_value_template</strong> (<em>Optional</em>): Defines a <a href="/topics/templating/">template</a> to extract the state value.</li>
|
||||
<li><strong>state_value_template</strong> (<em>Optional</em>): Defines a <a href="/docs/configuration/templating/#processing-incoming-data">template</a> to extract the state value.</li>
|
||||
<li><strong>white_value_command_topic</strong> (<em>Optional</em>): The MQTT topic to publish commands to change the light’s white value.</li>
|
||||
<li><strong>white_value_state_topic</strong> (<em>Optional</em>): The MQTT topic subscribed to receive white value updates.</li>
|
||||
<li><strong>white_value_value_template</strong> (<em>Optional</em>): Defines a <a href="/topics/templating/">template</a> to extract the white value.</li>
|
||||
<li><strong>white_value_value_template</strong> (<em>Optional</em>): Defines a <a href="/docs/configuration/templating/#processing-incoming-data">template</a> to extract the white value.</li>
|
||||
<li><strong>xy_command_topic</strong> (<em>Optional</em>): The MQTT topic to publish commands to change the light’s XY state.</li>
|
||||
<li><strong>xy_state_topic</strong> (<em>Optional</em>): The MQTT topic subscribed to receive XY state updates.</li>
|
||||
<li><strong>xy_value_template</strong> (<em>Optional</em>): Defines a <a href="/topics/templating/">template</a> to extract the XY value.</li>
|
||||
<li><strong>xy_value_template</strong> (<em>Optional</em>): Defines a <a href="/docs/configuration/templating/#processing-incoming-data">template</a> to extract the XY value.</li>
|
||||
</ul>
|
||||
<p class="note warning">
|
||||
Make sure that your topics match exact. <code class="highlighter-rouge">some-topic/</code> and <code class="highlighter-rouge">some-topic</code> are different topics.
|
||||
|
@ -202,7 +202,7 @@
|
|||
<p>To enable a light with brightness (no RGB version) in your installation, add the following to your <code class="highlighter-rouge">configuration.yaml</code> file:</p>
|
||||
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example configuration.yml entry</span>
|
||||
<span class="s">light</span><span class="pi">:</span>
|
||||
<span class="s">platform</span><span class="pi">:</span> <span class="s">mqtt</span>
|
||||
<span class="pi">-</span> <span class="s">platform</span><span class="pi">:</span> <span class="s">mqtt</span>
|
||||
<span class="s">name</span><span class="pi">:</span> <span class="s2">"</span><span class="s">Office</span><span class="nv"> </span><span class="s">light"</span>
|
||||
<span class="s">state_topic</span><span class="pi">:</span> <span class="s2">"</span><span class="s">office/rgb1/light/status"</span>
|
||||
<span class="s">command_topic</span><span class="pi">:</span> <span class="s2">"</span><span class="s">office/rgb1/light/switch"</span>
|
||||
|
|
|
@ -86,16 +86,16 @@ It is format-agnostic so you can use any data format you want (i.e. string, JSON
|
|||
<li><strong>effect_list</strong> (<em>Optional</em>): List of possible effects.</li>
|
||||
<li><strong>command_topic</strong> (<em>Required</em>): The MQTT topic to publish commands to change the light’s state.</li>
|
||||
<li><strong>state_topic</strong> (<em>Optional</em>): The MQTT topic subscribed to receive state updates.</li>
|
||||
<li><strong>command_on_template</strong> (<em>Required</em>): The template for <em>on</em> state changes. Available variables: <code class="highlighter-rouge">state</code>, <code class="highlighter-rouge">brightness</code>, <code class="highlighter-rouge">red</code>, <code class="highlighter-rouge">green</code>, <code class="highlighter-rouge">blue</code>, <code class="highlighter-rouge">flash</code>, <code class="highlighter-rouge">transition</code> and <code class="highlighter-rouge">effect</code>.</li>
|
||||
<li><strong>command_off_template</strong> (<em>Required</em>): The template for <em>off</em> state changes. Available variables: <code class="highlighter-rouge">state</code> and <code class="highlighter-rouge">transition</code>.</li>
|
||||
<li><strong>state_template</strong> (<em>Optional</em>): Template to extract state from the state payload value.</li>
|
||||
<li><strong>brightness_template</strong> (<em>Optional</em>): Template to extract brightness from the state payload value.</li>
|
||||
<li><strong>red_template</strong> (<em>Optional</em>): Template to extract red color from the state payload value.</li>
|
||||
<li><strong>green_template</strong> (<em>Optional</em>): Template to extract green color from the state payload value.</li>
|
||||
<li><strong>blue_template</strong> (<em>Optional</em>): Template to extract blue color from the state payload value.</li>
|
||||
<li><strong>color_temp_template</strong> (<em>Optional</em>): Template to extract color temperature from the state payload value.</li>
|
||||
<li><strong>effect_template</strong> (<em>Optional</em>): Template to extract effect from the state payload value.</li>
|
||||
<li><strong>white_value_template</strong> (<em>Optional</em>): Template to extract white value from the state payload value.</li>
|
||||
<li><strong>command_on_template</strong> (<em>Required</em>): The <a href="/docs/configuration/templating/#processing-incoming-data">template</a> for <em>on</em> state changes. Available variables: <code class="highlighter-rouge">state</code>, <code class="highlighter-rouge">brightness</code>, <code class="highlighter-rouge">red</code>, <code class="highlighter-rouge">green</code>, <code class="highlighter-rouge">blue</code>, <code class="highlighter-rouge">flash</code>, <code class="highlighter-rouge">transition</code> and <code class="highlighter-rouge">effect</code>.</li>
|
||||
<li><strong>command_off_template</strong> (<em>Required</em>): The <a href="/docs/configuration/templating/#processing-incoming-data">template</a> for <em>off</em> state changes. Available variables: <code class="highlighter-rouge">state</code> and <code class="highlighter-rouge">transition</code>.</li>
|
||||
<li><strong>state_template</strong> (<em>Optional</em>): <a href="/docs/configuration/templating/#processing-incoming-data">Template</a> to extract state from the state payload value.</li>
|
||||
<li><strong>brightness_template</strong> (<em>Optional</em>): <a href="/docs/configuration/templating/#processing-incoming-data">Template</a> to extract brightness from the state payload value.</li>
|
||||
<li><strong>red_template</strong> (<em>Optional</em>): <a href="/docs/configuration/templating/#processing-incoming-data">Template</a> to extract red color from the state payload value.</li>
|
||||
<li><strong>green_template</strong> (<em>Optional</em>): <a href="/docs/configuration/templating/#processing-incoming-data">Template</a> to extract green color from the state payload value.</li>
|
||||
<li><strong>blue_template</strong> (<em>Optional</em>): <a href="/docs/configuration/templating/#processing-incoming-data">Template</a> to extract blue color from the state payload value.</li>
|
||||
<li><strong>color_temp_template</strong> (<em>Optional</em>): <a href="/docs/configuration/templating/#processing-incoming-data">Template</a> to extract color temperature from the state payload value.</li>
|
||||
<li><strong>effect_template</strong> (<em>Optional</em>): <a href="/docs/configuration/templating/#processing-incoming-data">Template</a> to extract effect from the state payload value.</li>
|
||||
<li><strong>white_value_template</strong> (<em>Optional</em>): <a href="/docs/configuration/templating/#processing-incoming-data">Template</a> to extract white value from the state payload value.</li>
|
||||
<li><strong>optimistic</strong> (<em>Optional</em>): Flag that defines if the light works in optimistic mode. Default is true if no state topic or state template is defined, else false.</li>
|
||||
<li><strong>qos</strong> (<em>Optional</em>): The maximum QoS level of the state topic. Default is 0 and will also be used to publishing messages.</li>
|
||||
</ul>
|
||||
|
|
|
@ -87,7 +87,7 @@
|
|||
<li><strong>optimistic</strong> (<em>Optional</em>): Flag that defines if lock works in optimistic mode. Default is <code class="highlighter-rouge">true</code> if no <code class="highlighter-rouge">state_topic</code> defined, else <code class="highlighter-rouge">false</code>.</li>
|
||||
<li><strong>qos</strong> (<em>Optional</em>): The maximum QoS level of the state topic. Default is 0 and will also be used to publishing messages.</li>
|
||||
<li><strong>retain</strong> (<em>Optional</em>): If the published message should have the retain flag on or not.</li>
|
||||
<li><strong>value_template</strong> (<em>Optional</em>): Defines a <a href="/topics/templating/">template</a> to extract a value from the payload.</li>
|
||||
<li><strong>value_template</strong> (<em>Optional</em>): Defines a <a href="/docs/configuration/templating/#processing-incoming-data">template</a> to extract a value from the payload.</li>
|
||||
</ul>
|
||||
<p class="note warning">
|
||||
Make sure that your topic match exact. <code class="highlighter-rouge">some-topic/</code> and <code class="highlighter-rouge">some-topic</code> are different topics.
|
||||
|
@ -98,7 +98,7 @@ Make sure that your topic match exact. <code class="highlighter-rouge">some-topi
|
|||
<p>The example below shows a full configuration for a MQTT lock.</p>
|
||||
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example configuration.yml entry</span>
|
||||
<span class="s">lock</span><span class="pi">:</span>
|
||||
<span class="s">platform</span><span class="pi">:</span> <span class="s">mqtt</span>
|
||||
<span class="pi">-</span> <span class="s">platform</span><span class="pi">:</span> <span class="s">mqtt</span>
|
||||
<span class="s">name</span><span class="pi">:</span> <span class="s">Frontdoor</span>
|
||||
<span class="s">state_topic</span><span class="pi">:</span> <span class="s2">"</span><span class="s">home-assistant/frontdoor/"</span>
|
||||
<span class="s">command_topic</span><span class="pi">:</span> <span class="s2">"</span><span class="s">home-assistant/frontdoor/set"</span>
|
||||
|
|
|
@ -90,7 +90,7 @@
|
|||
<ul>
|
||||
<li><strong>name</strong> (<em>Optional</em>): The name to use for the frontend.</li>
|
||||
<li><strong>unit_of_measurement</strong> (<em>Optional</em>): Defines the units of measurement of the sensor, if any.</li>
|
||||
<li><strong>value_template</strong> (<em>Optional</em>): Defines a <a href="/topics/templating/">template</a> to extract a value from the payload.</li>
|
||||
<li><strong>value_template</strong> (<em>Optional</em>): Defines a <a href="/docs/configuration/templating/#processing-incoming-data">template</a> to extract a value from the payload.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -101,7 +101,7 @@
|
|||
<ul>
|
||||
<li><strong>name</strong> (<em>Required</em>): The name of the variable you wish to monitor.</li>
|
||||
<li><strong>unit_of_measurement</strong> (<em>Optional</em>): Defines the unit of measurement of the sensor, if any.</li>
|
||||
<li><strong>value_template</strong> (<em>Optional</em>): Defines a <a href="/topics/templating/">template</a> to extract a value from the payload.</li>
|
||||
<li><strong>value_template</strong> (<em>Optional</em>): Defines a <a href="/docs/configuration/templating/#processing-incoming-data">template</a> to extract a value from the payload.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
@ -79,8 +79,8 @@
|
|||
<li><strong>command</strong> (<em>Required</em>): The action to take to get the value.</li>
|
||||
<li><strong>name</strong> (<em>Optional</em>): Name of the command sensor.</li>
|
||||
<li><strong>unit_of_measurement</strong> (<em>Optional</em>): Defines the unit of measurement of the sensor, if any.</li>
|
||||
<li><strong>value_template</strong> (<em>Optional</em>): Defines a <a href="/topics/templating/">template</a> to extract a value from the payload.</li>
|
||||
<li><strong>scan_interval</strong> (<em>Optional</em>): Defines number of seconds for polling interval</li>
|
||||
<li><strong>value_template</strong> (<em>Optional</em>): Defines a <a href="/docs/configuration/templating/#processing-incoming-data">template</a> to extract a value from the payload.</li>
|
||||
<li><strong>scan_interval</strong> (<em>Optional</em>): Defines number of seconds for polling interval.</li>
|
||||
</ul>
|
||||
<h2><a class="title-link" name="examples" href="#examples"></a> Examples</h2>
|
||||
<p>In this section you find some real life examples of how to use this sensor.</p>
|
||||
|
|
|
@ -84,7 +84,7 @@
|
|||
<li><strong>include_only_feed_id</strong> (<em>Optional</em>): Positive integer list of Emoncms feed IDs. Only the feeds with feed IDs specified here will be displayed. Can not be specified if <code class="highlighter-rouge">exclude_feed_id</code> is specified.</li>
|
||||
<li><strong>exclude_feed_id</strong> (<em>Optional</em>): Positive integer list of Emoncms feed IDs. All the feeds will be displayed as sensors except the ones listed here. Can not be specified if <code class="highlighter-rouge">include_only_feed_id</code> is specified.</li>
|
||||
<li><strong>sensor_names</strong> (<em>Optional</em>): Dictionary of names for the sensors created that are created based on feed ID. The dictionary consists of <code class="highlighter-rouge">feedid: name</code> pairs. Sensors for feeds with their feed ID mentioned here will get the chosen name instead of the default name</li>
|
||||
<li><strong>value_template</strong> (<em>Optional</em>): Defines a <a href="/topics/templating/">template</a> to alter the feed value.</li>
|
||||
<li><strong>value_template</strong> (<em>Optional</em>): Defines a <a href="/docs/configuration/templating/#processing-incoming-data">template</a> to alter the feed value.</li>
|
||||
<li><strong>scan_interval</strong> (<em>Optional</em>): Defines the update interval of the sensor in seconds.</li>
|
||||
<li><strong>unit_of_measurement</strong> (<em>Optional</em>): Defines the unit of measurement of for all the sensors. default is “W”.</li>
|
||||
</ul>
|
||||
|
|
|
@ -79,7 +79,7 @@
|
|||
<li><strong>file_path</strong> (<em>Required</em>): path to file that stores the sensor data.</li>
|
||||
<li><strong>name</strong> (<em>Optional</em>): Name of the sensor to use in the frontend. Defaults to <code class="highlighter-rouge">File</code>.</li>
|
||||
<li><strong>unit_of_measurement</strong> (<em>Optional</em>): Defines the units of measurement of the sensor, if any.</li>
|
||||
<li><strong>value_template</strong> (<em>Optional</em>): Defines a <a href="/topics/templating/">template</a> to extract a value from the payload.</li>
|
||||
<li><strong>value_template</strong> (<em>Optional</em>): Defines a <a href="/docs/configuration/templating/#processing-incoming-data">template</a> to extract a value from the payload.</li>
|
||||
</ul>
|
||||
<h2><a class="title-link" name="examples" href="#examples"></a> Examples</h2>
|
||||
<p>In this section you find some real life examples of how to use this sensor.</p>
|
||||
|
|
|
@ -91,7 +91,7 @@
|
|||
<li><strong>unit_of_measurement</strong> (<em>Optional</em>): Defines the units of measurement of the sensor, if any.</li>
|
||||
<li><strong>measurement</strong> (<em>Required</em>): Defines the measurement name in InfluxDB (the from clause of the query).</li>
|
||||
<li><strong>where</strong> (<em>Required</em>): Defines the data selection clause (the where clause of the query).</li>
|
||||
<li><strong>value_template</strong> (<em>Optional</em>): Defines a <a href="/topics/templating/">template</a> to extract a value from the payload.</li>
|
||||
<li><strong>value_template</strong> (<em>Optional</em>): Defines a <a href="/docs/configuration/templating/#processing-incoming-data">template</a> to extract a value from the payload.</li>
|
||||
<li><strong>database</strong> (<em>Optional</em>): Name of the database to use. Defaults to <code class="highlighter-rouge">home_assistant</code>.</li>
|
||||
<li><strong>group_function</strong> (<em>Optional</em>): The group function to be used. Defaults to <code class="highlighter-rouge">mean</code>.</li>
|
||||
<li><strong>field</strong> (<em>Optional</em>): The field name to select. Defaults to value.</li>
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
<li><strong>qos</strong> (<em>Optional</em>): The maximum QoS level of the state topic. Default is 0.</li>
|
||||
<li><strong>unit_of_measurement</strong> (<em>Optional</em>): Defines the units of measurement of the sensor, if any.</li>
|
||||
<li><strong>expire_after</strong> (<em>Optional</em>): Defines the number of seconds after the value expires if it’s not updated. Default is 0 (=never expire).</li>
|
||||
<li><strong>value_template</strong> (<em>Optional</em>): Defines a <a href="/topics/templating/">template</a> to extract a value from the payload.</li>
|
||||
<li><strong>value_template</strong> (<em>Optional</em>): Defines a <a href="/docs/configuration/templating/#processing-incoming-data">template</a> to extract a value from the payload.</li>
|
||||
</ul>
|
||||
<h2><a class="title-link" name="examples" href="#examples"></a> Examples</h2>
|
||||
<p>In this section you find some real life examples of how to use this sensor.</p>
|
||||
|
|
|
@ -87,7 +87,7 @@
|
|||
<ul>
|
||||
<li><strong>resource</strong> (<em>Required</em>): The resource or endpoint that contains the value.</li>
|
||||
<li><strong>method</strong> (<em>Optional</em>): The method of the request. Default is <code class="highlighter-rouge">GET</code>.</li>
|
||||
<li><strong>value_template</strong> (<em>Optional</em>): Defines a <a href="/topics/templating/">template</a> to extract the value.</li>
|
||||
<li><strong>value_template</strong> (<em>Optional</em>): Defines a <a href="/docs/configuration/templating/#processing-incoming-data">template</a> to extract the value.</li>
|
||||
<li><strong>payload</strong> (<em>Optional</em>): The payload to send with a POST request. Depends on the service, but usually formed as JSON.</li>
|
||||
<li><strong>name</strong> (<em>Optional</em>): Name of the REST sensor.</li>
|
||||
<li><strong>unit_of_measurement</strong> (<em>Optional</em>): Defines the unit of measurement of the sensor, if any.</li>
|
||||
|
|
|
@ -83,7 +83,7 @@
|
|||
<li><strong>port</strong> (<em>Required</em>): The port to connect to the host on.</li>
|
||||
<li><strong>payload</strong> (<em>Required</em>): What to send to the host in order to get the response we’re interested in.</li>
|
||||
<li><strong>timeout</strong> (<em>Optional</em>): How long in seconds to wait for a response from the service before giving up and disconnecting. Defaults to <code class="highlighter-rouge">10</code></li>
|
||||
<li><strong>value_template</strong> (<em>Optional</em>): Defines a <a href="/topics/templating/">template</a> to extract the value. By default it’s assumed that the entire response is the value.</li>
|
||||
<li><strong>value_template</strong> (<em>Optional</em>): Defines a <a href="/docs/configuration/templating/#processing-incoming-data">template</a> to extract the value. By default it’s assumed that the entire response is the value.</li>
|
||||
<li><strong>unit_of_measurement</strong> (<em>Optional</em>): The unit of measurement to use for the value.</li>
|
||||
<li><strong>buffer_size</strong> (<em>Optional</em>): The size of the receive buffer in bytes. Set this to a larger value if you expect to receive a response larger than the default. Defaults to <code class="highlighter-rouge">1024</code>.</li>
|
||||
</ul>
|
||||
|
|
|
@ -86,7 +86,7 @@
|
|||
<ul>
|
||||
<li><strong>friendly_name</strong> (<em>Optional</em>): Name to use in the Frontend.</li>
|
||||
<li><strong>unit_of_measurement</strong> (<em>Optional</em>): Defines the units of measurement of the sensor, if any.</li>
|
||||
<li><strong>value_template</strong> (<em>Required</em>): Defines a <a href="/topics/templating/">template</a> to extract a value from the event bus.</li>
|
||||
<li><strong>value_template</strong> (<em>Required</em>): Defines a <a href="/docs/configuration/templating/#processing-incoming-data">template</a> to extract a value from the event bus.</li>
|
||||
<li><strong>icon_template</strong> (<em>Optional</em>): Defines a <a href="/topics/templating/">template</a> for the icon of the sensor.</li>
|
||||
<li><strong>entity_id</strong> (<em>Optional</em>): Add a list of entity IDs so the sensor only reacts to state changes of these entities. This will reduce the number of times the sensor will try to update it’s state.</li>
|
||||
</ul>
|
||||
|
|
|
@ -87,7 +87,7 @@
|
|||
<li><strong>optimistic</strong> (<em>Optional</em>): Flag that defines if switch works in optimistic mode. Default is <code class="highlighter-rouge">true</code> if no <code class="highlighter-rouge">state_topic</code> defined, else <code class="highlighter-rouge">false</code>.</li>
|
||||
<li><strong>qos</strong> (<em>Optional</em>): The maximum QoS level of the state topic. Default is 0 and will also be used to publishing messages.</li>
|
||||
<li><strong>retain</strong> (<em>Optional</em>): If the published message should have the retain flag on or not.</li>
|
||||
<li><strong>value_template</strong> (<em>Optional</em>): Defines a <a href="/topics/templating/">template</a> to extract a value from the payload.</li>
|
||||
<li><strong>value_template</strong> (<em>Optional</em>): Defines a <a href="/docs/configuration/templating/#processing-incoming-data">template</a> to extract a value from the payload.</li>
|
||||
</ul>
|
||||
<p class="note warning">
|
||||
Make sure that your topic match exact. <code class="highlighter-rouge">some-topic/</code> and <code class="highlighter-rouge">some-topic</code> are different topics.
|
||||
|
|
|
@ -80,7 +80,7 @@
|
|||
<li><strong>name</strong> (<em>Optional</em>): Name of the REST switch.</li>
|
||||
<li><strong>body_on</strong> (<em>Optional</em>): The body of the POST request that commands the switch to become enabled. Default is “ON”. This value can be a <a href="/topics/templating/">template</a>.</li>
|
||||
<li><strong>body_off</strong> (<em>Optional</em>): The body of the POST request that commands the switch to become disabled. Default is “OFF”. This value can also be a <a href="/topics/templating/">template</a>.</li>
|
||||
<li><strong>is_on_template</strong> (<em>Optional</em>): A <a href="/topics/templating/">template</a> that determines the state of the switch from the value returned by the GET request on the resource URL. This template should compute to a boolean (True or False). If the value is valid JSON, it will be available in the template as the variable <code class="highlighter-rouge">value_json</code>. See <a href="/docs/configuration/templating/#processing-incoming-data">this example</a> in the template documentation. Default is equivalent to <code class="highlighter-rouge">'{{ value_json == body_on }}'</code>. This means that by default, the state of the switch is on if and only if the response to the GET request matches .</li>
|
||||
<li><strong>is_on_template</strong> (<em>Optional</em>): A <a href="/docs/configuration/templating/#processing-incoming-data">template</a> that determines the state of the switch from the value returned by the GET request on the resource URL. This template should compute to a boolean (True or False). If the value is valid JSON, it will be available in the template as the variable <code class="highlighter-rouge">value_json</code>. Default is equivalent to <code class="highlighter-rouge">'{{ value_json == body_on }}'</code>. This means that by default, the state of the switch is on if and only if the response to the GET request matches .</li>
|
||||
</ul>
|
||||
<p class="note warning">
|
||||
Make sure that the URL matches exactly your endpoint or resource.
|
||||
|
|
|
@ -221,6 +221,18 @@ Closest to an entity: {{ closest(states.zone.school, 'group.children') }}
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>This means that if the incoming values looks like the sample below:</p>
|
||||
<div class="language-json highlighter-rouge"><pre class="highlight"><code><span class="p">{</span><span class="w">
|
||||
</span><span class="nt">"on"</span><span class="p">:</span><span class="w"> </span><span class="s2">"true"</span><span class="p">,</span><span class="w">
|
||||
</span><span class="nt">"temp"</span><span class="p">:</span><span class="w"> </span><span class="mi">21</span><span class="w">
|
||||
</span><span class="p">}</span><span class="w">
|
||||
</span></code></pre>
|
||||
</div>
|
||||
<p>The template for <code class="highlighter-rouge">on</code> would be:</p>
|
||||
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="s1">'</span><span class="s">{{value_json.on}}'</span>
|
||||
</code></pre>
|
||||
</div>
|
||||
<p>The following overview contains a couple of options to get the needed values:</p>
|
||||
<div class="language-text highlighter-rouge"><pre class="highlight"><code># Incoming value:
|
||||
{"primes": [2, 3, 5, 7, 11, 13]}
|
||||
|
||||
|
|
30
sitemap.xml
30
sitemap.xml
|
@ -3466,62 +3466,62 @@
|
|||
</url>
|
||||
<url>
|
||||
<loc>https://home-assistant.io/demo/frontend.html</loc>
|
||||
<lastmod>2017-05-28T17:31:02+00:00</lastmod>
|
||||
<lastmod>2017-05-28T17:42:10+00:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://home-assistant.io/demo/index.html</loc>
|
||||
<lastmod>2017-05-28T17:31:02+00:00</lastmod>
|
||||
<lastmod>2017-05-28T17:42:10+00:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://home-assistant.io/demo/panels/ha-panel-dev-event.html</loc>
|
||||
<lastmod>2017-05-28T17:31:02+00:00</lastmod>
|
||||
<lastmod>2017-05-28T17:42:10+00:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://home-assistant.io/demo/panels/ha-panel-dev-info.html</loc>
|
||||
<lastmod>2017-05-28T17:31:02+00:00</lastmod>
|
||||
<lastmod>2017-05-28T17:42:10+00:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://home-assistant.io/demo/panels/ha-panel-dev-service.html</loc>
|
||||
<lastmod>2017-05-28T17:31:02+00:00</lastmod>
|
||||
<lastmod>2017-05-28T17:42:10+00:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://home-assistant.io/demo/panels/ha-panel-dev-state.html</loc>
|
||||
<lastmod>2017-05-28T17:31:02+00:00</lastmod>
|
||||
<lastmod>2017-05-28T17:42:10+00:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://home-assistant.io/demo/panels/ha-panel-dev-template.html</loc>
|
||||
<lastmod>2017-05-28T17:31:02+00:00</lastmod>
|
||||
<lastmod>2017-05-28T17:42:10+00:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://home-assistant.io/demo/panels/ha-panel-history.html</loc>
|
||||
<lastmod>2017-05-28T17:31:02+00:00</lastmod>
|
||||
<lastmod>2017-05-28T17:42:10+00:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://home-assistant.io/demo/panels/ha-panel-iframe.html</loc>
|
||||
<lastmod>2017-05-28T17:31:02+00:00</lastmod>
|
||||
<lastmod>2017-05-28T17:42:10+00:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://home-assistant.io/demo/panels/ha-panel-logbook.html</loc>
|
||||
<lastmod>2017-05-28T17:31:02+00:00</lastmod>
|
||||
<lastmod>2017-05-28T17:42:10+00:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://home-assistant.io/demo/panels/ha-panel-map.html</loc>
|
||||
<lastmod>2017-05-28T17:31:02+00:00</lastmod>
|
||||
<lastmod>2017-05-28T17:42:10+00:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://home-assistant.io/googlef4f3693c209fe788.html</loc>
|
||||
<lastmod>2017-05-28T17:31:02+00:00</lastmod>
|
||||
<lastmod>2017-05-28T17:42:10+00:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://home-assistant.io/static/fonts/roboto/DESCRIPTION.en_us.html</loc>
|
||||
<lastmod>2017-05-28T17:31:02+00:00</lastmod>
|
||||
<lastmod>2017-05-28T17:42:10+00:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://home-assistant.io/static/fonts/robotomono/DESCRIPTION.en_us.html</loc>
|
||||
<lastmod>2017-05-28T17:31:02+00:00</lastmod>
|
||||
<lastmod>2017-05-28T17:42:10+00:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://home-assistant.io/static/mdi-demo.html</loc>
|
||||
<lastmod>2017-05-28T17:31:02+00:00</lastmod>
|
||||
<lastmod>2017-05-28T17:42:10+00:00</lastmod>
|
||||
</url>
|
||||
</urlset>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue