home-assistant.github.io/components/remember_the_milk/index.html
2018-01-25 17:33:45 +00:00

278 lines
17 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!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>Remember The Milk - Home Assistant</title>
<meta name="author" content="Home Assistant">
<meta name="description" content="Instructions on how to use Remember The Milk with Home Assistant.">
<meta name="viewport" content="width=device-width">
<link rel="canonical" href="https://home-assistant.io/components/remember_the_milk/">
<meta property="fb:app_id" content="338291289691179">
<meta property="og:title" content="Remember The Milk">
<meta property="og:site_name" content="Home Assistant">
<meta property="og:url" content="https://home-assistant.io/components/remember_the_milk/">
<meta property="og:type" content="article">
<meta property="og:description" content="Instructions on how to use Remember The Milk with Home Assistant.">
<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="Remember The Milk">
<meta name="twitter:description" content="Instructions on how to use Remember The Milk with Home Assistant.">
<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">
Remember The Milk
</h1>
</header>
<hr class="divider">
<p>The <code class="highlighter-rouge">Remember The Milk</code> (RTM) component allows you to create tasks in <a href="https://www.rememberthemilk.com">remember_the_milk</a> from Home Assistant. You can use this if you want Home Assistant to send you a task that you should not forget, e.g. water the plants. The component allows you to have several RTM accounts in parallel.</p>
<h2><a class="title-link" name="setup" href="#setup"></a> Setup</h2>
<p>The setup consists of two steps: getting an API key and registering your account</p>
<h3><a class="title-link" name="step-1-api-key" href="#step-1-api-key"></a> Step 1: API key</h3>
<p>To be able to use this component, you need a Remember The Milk account and you need to apply for your own <a href="https://www.rememberthemilk.com/services/api/keys.rtm">API key</a>. With the API key you will also receive your personal <code class="highlighter-rouge">shared secret</code>. Both of them need to be stored in your Home Assistant configuration:</p>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example configuration.yaml entry</span>
<span class="s">remember_the_milk</span><span class="pi">:</span>
<span class="pi">-</span> <span class="s">name</span><span class="pi">:</span> <span class="s">your_rtm_account</span>
<span class="s">api_key</span><span class="pi">:</span> <span class="s">&lt;your secret api key goes here&gt;</span>
<span class="s">shared_secret</span><span class="pi">:</span> <span class="s">&lt;your secret shared secret goes here&gt;</span>
</code></pre>
</div>
<p>Configuration variables:</p>
<div class="config-vars">
<h3><a class="title-link" name="configuration-variables" href="#configuration-variables"></a> Configuration Variables</h3>
<dl class="">
<dt><a class="title-link" name="name" href="#name"></a> name</dt>
<dd>
<p class="desc"><span class="type">(<span class="string">string</span>)</span><span class="required">(Required)</span><span class="description">Name of the RTM account, as you can have several accounts in RTM. The name must be unique.</span></p>
</dd>
<dt><a class="title-link" name="api_key" href="#api_key"></a> api_key</dt>
<dd>
<p class="desc"><span class="type">(<span class="string">string</span>)</span><span class="required">(Required)</span><span class="description">Put the API key youve received in here.</span></p>
</dd>
<dt><a class="title-link" name="shared_secret" href="#shared_secret"></a> shared_secret</dt>
<dd>
<p class="desc"><span class="type">(<span class="string">string</span>)</span><span class="required">(Required)</span><span class="description">Put the shared secret youve received in here.</span></p>
</dd>
</dl>
</div>
<h3><a class="title-link" name="step-2-registering-your-account" href="#step-2-registering-your-account"></a> Step 2: registering your account</h3>
<p>After saving the configuration, you need to (re-)start Home Assistant. On the first start you will notice a new “Configuration” panel appearing on the Home Assistant page. After opening the configuration page, follow the link “Remember The Milk login”. This will take you to a login page where you have to log in with your normal Rember The Milk credentials. This will authorize Home Assistant to access your Remember The Milk account.</p>
<p>After that click on the “login completed” button. This will tell Home Assistant that you have completed the login process on the Remember The Milk page and Home Assistant should try to register with this account.</p>
<p>If the registration was successful, the Configuration panel will disappear from your Home Assistant screen and a Remember The Milk panel should appear. This completes the setup process.</p>
<p>In the background Home Assistant downloaded a “token” from the Remember The Milk server which is stored in the <code class="highlighter-rouge">remember_the_milk.conf</code> file locally. So you only need to register once. After that the token is used to authenticate with the server.</p>
<h2><a class="title-link" name="creatingupdating-tasks-with-service-create_task" href="#creatingupdating-tasks-with-service-create_task"></a> Creating/updating tasks with service <code class="highlighter-rouge">create_task</code></h2>
<p>This component offers a new service domain <code class="highlighter-rouge">remember_the_milk</code> with the services <code class="highlighter-rouge">&lt;account&gt;_create_task</code>. You can call this service with the argument <code class="highlighter-rouge">name</code> and the optional parameter <code class="highlighter-rouge">id</code> to create a new task in your Remember The Milk account. You can call this service from your usual automations.</p>
<p>If you set an <code class="highlighter-rouge">id</code> and a task with that id exists already, the existing task is updated, rather than creating a new task. This way you can change the name of the task. If you do not set an <code class="highlighter-rouge">id</code>, a new task is created with every call. If youre using this from an automation, you could use the name of your automation as id or the entity that triggered the task to be created. This way you can later on update or complete this task.</p>
<p>The task creation supports the “smart syntax”, so to create a task with the tag “from_hass” which is due today you can create a task with the name <code class="highlighter-rouge">test task created in Home Assistant ^today #from_hass</code>. More info about the smart syntax is available on the <a href="https://www.rememberthemilk.com/help/answer/basics-smartadd-howdoiuse">Remember The Milk documentation</a>.</p>
<p><strong>Note:</strong>
At the moment, smart syntax is <em>not</em> supported when updating tasks. All smart syntax commands are ignored during the update and will end up as normal text in the name of the task.</p>
<table>
<thead>
<tr>
<th>Service data attribute</th>
<th>Optional</th>
<th>Description</th>
<th>Example</th>
</tr>
</thead>
<tbody>
<tr>
<td>name</td>
<td>no</td>
<td>Name of the new task, you can use the smart syntax here.</td>
<td>“do this ^today #from_hass”</td>
</tr>
<tr>
<td>id</td>
<td>yes</td>
<td>Identifier for the task youre creating, can be used to update or complete the task later on</td>
<td>“myid”</td>
</tr>
</tbody>
</table>
<h2><a class="title-link" name="completing-tasks-with-service--complete_task" href="#completing-tasks-with-service--complete_task"></a> Completing tasks with service <code class="highlighter-rouge">complete_task</code></h2>
<p>Complete a tasks that was privously created from Home Assistant. You can not complete tasks that were created outside of Home Assistant.</p>
<p>If you have created your task with an <code class="highlighter-rouge">id</code>, calling <code class="highlighter-rouge">&lt;account&gt;_complete_task</code> with the parameter <code class="highlighter-rouge">id</code> will then complete your task.</p>
<table>
<thead>
<tr>
<th>Service data attribute</th>
<th>Optional</th>
<th>Description</th>
<th>Example</th>
</tr>
</thead>
<tbody>
<tr>
<td>id</td>
<td>no</td>
<td>Identifier that was defined when creating the task</td>
<td>“myid”</td>
</tr>
</tbody>
</table>
<h2><a class="title-link" name="automation-example" href="#automation-example"></a> Automation example</h2>
<p>Heres an example for an automation that creates a new task whenever <code class="highlighter-rouge">sensor.mysensor</code> is <code class="highlighter-rouge">on</code> and completes it when the sensor reports <code class="highlighter-rouge">off</code>. This way it reminds you to switch it off. By using the <code class="highlighter-rouge">entity_id</code> as id for the task, you can use the same rule also for multiple sensors.</p>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="pi">-</span> <span class="s">id</span><span class="pi">:</span> <span class="s">mysensor_on</span>
<span class="s">trigger</span><span class="pi">:</span>
<span class="s">platform</span><span class="pi">:</span> <span class="s">state</span>
<span class="s">entity_id</span><span class="pi">:</span> <span class="s">sensor.mysensor</span>
<span class="s">to</span><span class="pi">:</span> <span class="s">on</span>
<span class="s">action</span><span class="pi">:</span>
<span class="pi">-</span> <span class="s">service</span><span class="pi">:</span> <span class="s">remember_the_milk.myaccount_create_task</span>
<span class="s">data_template</span><span class="pi">:</span>
<span class="s">name</span><span class="pi">:</span> <span class="s2">"</span><span class="s">Please</span><span class="nv"> </span><span class="s">switch</span><span class="nv"> </span><span class="s">of</span><span class="nv"> </span><span class="s">"</span>
<span class="s">id</span><span class="pi">:</span> <span class="s2">"</span><span class="s">"</span>
<span class="pi">-</span> <span class="s">id</span><span class="pi">:</span> <span class="s">mysensor_off</span>
<span class="s">trigger</span><span class="pi">:</span>
<span class="s">platform</span><span class="pi">:</span> <span class="s">state</span>
<span class="s">entity_id</span><span class="pi">:</span> <span class="s">sensor.mysensor</span>
<span class="s">to</span><span class="pi">:</span> <span class="s">off</span>
<span class="s">action</span><span class="pi">:</span>
<span class="pi">-</span> <span class="s">service</span><span class="pi">:</span> <span class="s">remember_the_milk.myaccount_complete_task</span>
<span class="s">data_template</span><span class="pi">:</span>
<span class="s">id</span><span class="pi">:</span> <span class="s2">"</span><span class="s">"</span>
</code></pre>
</div>
<h2><a class="title-link" name="disclaimer" href="#disclaimer"></a> Disclaimer</h2>
<p>This product uses the Remember The Milk API but is not endorsed or certified by Remember The Milk.</p>
</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/_components/remember_the_milk.markdown'>Edit this page on GitHub</a></div>
<div class='brand-logo-container section'>
<img src='/images/supported_brands/rememberthemilk.png' />
</div>
<div class='section'>
Introduced in release: 0.57
</div>
<div class='section'>
<h1 class="title delta">Category Calendar</h1>
<ul class='divided'>
<li>
<a href='/components/calendar.caldav/'>CalDav</a>
</li>
<li>
<a href='/components/calendar.google/'>Google Calendar Event</a>
</li>
<li>
Remember The Milk
</li>
<li>
<a href='/components/sensor.time_date/'>Time & Date</a>
</li>
<li>
<a href='/components/calendar.todoist/'>Todoist</a>
</li>
<li>
<a href='/components/sensor.worldclock/'>Worldclock</a>
</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>