From d80399cd507f39c420c4c958875f18f6a6b8ce68 Mon Sep 17 00:00:00 2001 From: Klaas Schoute Date: Mon, 25 Feb 2019 15:23:37 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=9C=20Merges/Redirect=20Habitica=20com?= =?UTF-8?q?ponent=20pages=20(#8728)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/_components/habitica.markdown | 23 ++++++++++++++++----- source/_components/sensor.habitica.markdown | 21 ------------------- 2 files changed, 18 insertions(+), 26 deletions(-) delete mode 100644 source/_components/sensor.habitica.markdown diff --git a/source/_components/habitica.markdown b/source/_components/habitica.markdown index 7da9936d680..87d43951186 100644 --- a/source/_components/habitica.markdown +++ b/source/_components/habitica.markdown @@ -8,13 +8,23 @@ comments: false sharing: true footer: true logo: habitica.png -ha_category: Hub +ha_category: + - Hub + - Sensor ha_version: 0.78 ha_iot_class: "Cloud Polling" +redirect_from: + - /components/sensor.habitica/ --- This component allows you to monitor and manage your Habitica profile. This component exposes the [Habitica's API](https://habitica.com/apidoc/) as a Home Assistant service. It supports multiple users and allows you to automate checking out your habits and daily tasks or casting magics using Home Assistant. -This component enables usage of [`sensor.habitica` platform.](/components/sensor.habitica/) + +There is currently support for the following device types within Home Assistant: + +- Sensor - Allows you to view and monitor your player data from [Habitica](https://habitica.com/) in Home Assistant. + +The sensors will automatically appear, after setup the Habitica component. + To use the component you should use this example configuration: ```yaml @@ -79,15 +89,17 @@ For example, let's say that there is a configured `habitica` platform for user ` Let's create a new task (a todo) for this user via Home Assistant. There is an [API call](https://habitica.com/apidoc/#api-Task-CreateUserTasks) for this purpose. To create a new task one should hit `https://habitica.com/api/v3/tasks/user` endpoint with `POST` request with a json object with task properties. So let's call the API on `habitica.api_call`. + * The `name` key becomes `xxxNotAValidNickxxx`. * The `path` key is trickier. - * Remove 'https://habitica.com/api/v3/' at the beginning of the endpoint URL. - * Split the remaining on slashes (/) and **append the lowercase method** at the end. - * You should get `["tasks", "user", "post"]`. To get a better idea of the API you are recommended to try all of the API calls in IPython console [using this package](https://github.com/ASMfreaK/habitipy/blob/master/README.md). + * Remove 'https://habitica.com/api/v3/' at the beginning of the endpoint URL. + * Split the remaining on slashes (/) and **append the lowercase method** at the end. + * You should get `["tasks", "user", "post"]`. To get a better idea of the API you are recommended to try all of the API calls in IPython console [using this package](https://github.com/ASMfreaK/habitipy/blob/master/README.md). * The `args` key is more or less described in the [docs](https://habitica.com/apidoc/). Combining all together: call `habitica.api_call` with data + ``` { "name": "xxxNotAValidNickxxx", @@ -101,6 +113,7 @@ This call will create a new todo on `xxxNotAValidNickxxx`'s account with text `U ![example task created](/images/screenshots/habitica_new_task.png) Also an event `habitica_api_call_success` will be fired with the following data: + ``` { "name": "xxxNotAValidNickxxx", diff --git a/source/_components/sensor.habitica.markdown b/source/_components/sensor.habitica.markdown deleted file mode 100644 index 4e94148bb9f..00000000000 --- a/source/_components/sensor.habitica.markdown +++ /dev/null @@ -1,21 +0,0 @@ ---- -layout: page -title: "Habitica Sensor" -description: "Instructions on enabling Habitica support for your Home Assistant" -date: 2018-08-09 00:00 -sidebar: true -comments: false -sharing: true -footer: true -logo: habitica.png -ha_category: Sensor -ha_iot_class: "Cloud Polling" -ha_version: 0.78 ---- - -The `habitica` sensor platform allows you to view and monitor your player data from [Habitica](https://habitica.com/) in Home Assistant. - -

-You must have the [`habitica` component](/components/habitica/) -configured to use this platform. After configuring that component, sensors specified there will automatically appear. -